Skip to content

Instantly share code, notes, and snippets.

@dimohamdy
Last active November 23, 2015 18:14
Show Gist options
  • Save dimohamdy/e00fcbab53d1f5abbe72 to your computer and use it in GitHub Desktop.
Save dimohamdy/e00fcbab53d1f5abbe72 to your computer and use it in GitHub Desktop.
UIImageView aspect fill
This preserves aspect, fills it up, and then clips overflows:
self.viewTitleImageView.contentMode = UIViewContentModeScaleAspectFill;
[self.viewTitleImageView setClipsToBounds:YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment