开发者

Objective C, How to make the corner of a picture in UIImageView round?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜