Created
January 9, 2014 20:33
-
-
Save samjarman/8341490 to your computer and use it in GitHub Desktop.
Rounding corners on UIViews (and their subclasses, UIImageView, etc)
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 * roundedView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"wood.jpg"]]; | |
// Get the Layer of any view | |
CALayer * l = [roundedView layer]; | |
[l setMasksToBounds:YES]; | |
[l setCornerRadius:10.0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment