UIImageView 设置 圆角

导入库以及引用头文件:QuartzCore.FrameWork,以及#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];
下面这个在网上找的还没试过:
+(UIImage *)imageWithContentsOfFile:(NSString *)file cornerRadius:(NSInteger)... 


你可能感兴趣的:(UIImageView 设置 圆角)