Created
December 22, 2015 10:00
-
-
Save MaximAlien/0667842c81aba76bc6e2 to your computer and use it in GitHub Desktop.
[iOS] UIImageView creation
This file contains 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
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)]; | |
imageView.image = [UIImage imageNamed:@"custom_image"]; | |
imageView.contentMode = UIViewContentModeScaleAspectFit; | |
imageView.bounds = CGRectInset(imageView.frame, 20.0f, 20.0f); | |
[self.navigationController.navigationBar addSubview:imageView]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment