Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged show{view,layer,image,imageref} into visualize #25

Merged
merged 7 commits into from
Mar 15, 2014
Merged

Merged show{view,layer,image,imageref} into visualize #25

merged 7 commits into from
Mar 15, 2014

Conversation

antons
Copy link
Contributor

@antons antons commented Mar 10, 2014

As suggested in #11 and #17, I merged show{view,layer,image,image ref} into visualize.

@mattjgalloway
Copy link
Member

Awesome! I like this. Can you add updating the README to the diff please?

@arigrant What do you think?

@antons
Copy link
Contributor Author

antons commented Mar 10, 2014

@mattjgalloway Thanks for reminding me about it.

if fb.evaluateBooleanExpression('(BOOL)((unsigned long)CFGetTypeID((CFTypeRef)' + object + ') == (unsigned long)CGImageGetTypeID())'):
_showImage('(id)[UIImage imageWithCGImage:' + object + ']')
else:
comarisonStr = '(BOOL)[' + object + 'isKindOfClass:[{} class]]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (BOOL) cast is unnecessary with the use of evaluateBooleanExpression.

@kastiglione
Copy link
Contributor

Thanks @antons 🔨

I have a couple comments, after that I'm 👍

@antons
Copy link
Contributor Author

antons commented Mar 10, 2014

@kastiglione Good idea about the error message. Nice to know evaluateBooleanExpression doesn’t need a cast. Done.

if fb.evaluateBooleanExpression('(unsigned long)CFGetTypeID((CFTypeRef)' + object + ') == (unsigned long)CGImageGetTypeID()'):
_showImage('(id)[UIImage imageWithCGImage:' + object + ']')
else:
isKindOfClassStr = '[' + object + 'isKindOfClass:[{} class]]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding an NSObjectHelpers file and making an isKindOfClass method? Other than that I am so happy for this and totally psyched. Thanks for doing this!

@antons
Copy link
Contributor Author

antons commented Mar 11, 2014

@arigrant Are you talking about something like this?

@arigrant
Copy link
Contributor

Yeah!

@arigrant
Copy link
Contributor

Looks good to me. Let's take it. Thanks!

arigrant added a commit that referenced this pull request Mar 15, 2014
Merged show{view,layer,image,imageref} into visualize
@arigrant arigrant merged commit c81646f into facebook:master Mar 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants