Objective C, How to make the corner of a picture in UIImageView round?
I want to do something like that开发者_高级运维.. How to make the corner of the image in the UIImageview round? Thanks in advance...
This will help you:
CALayer *l = [<yourimageview> layer];
[l setMasksToBounds:YES];
[l setCornerRadius:5.0];
Use this to make any size UIImageView round.
UIImageView *img = [ [UIImageView alloc]init ];
Img.layer.cornerRadius = img.frame.size.width / 2;
[Img.layer setMasksToBounds:YES];
thank you . Happy coding
精彩评论