Last active
December 20, 2015 11:49
-
-
Save UjwalManjunath/6126507 to your computer and use it in GitHub Desktop.
Making UIimage view roundrected
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
#import <QuartzCore/QuartzCore.h> | |
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]; | |
// You can even add a border | |
[l setBorderWidth:4.0]; | |
[l setBorderColor:[[UIColor blueColor] CGColor]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment