Skip to content

Instantly share code, notes, and snippets.

@UjwalManjunath
Last active December 20, 2015 11:49
Show Gist options
  • Save UjwalManjunath/6126507 to your computer and use it in GitHub Desktop.
Save UjwalManjunath/6126507 to your computer and use it in GitHub Desktop.
Making UIimage view roundrected
#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