Created
February 26, 2014 19:17
-
-
Save tapi/9236422 to your computer and use it in GitHub Desktop.
This is the funkiest assignment syntax I have ever seen used in Objective-C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_imageView = ({ | |
UIImageView *imageView = [[UIImageView alloc] init]; | |
imageView.contentMode = UIViewContentModeScaleAspectFill; | |
[self.scrollView addSubview:imageView]; | |
imageView; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[UIImageView new] would feel more natural with this style.