如何高性能的给UIImageView加个圆角

文/natewang(简书作者)
原文链接:http://www.jianshu.com/p/268f3839d2e6
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

其实你只需要的是圆角图片。。。。。

 UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale);
 [[UIBezierPath bezierPathWithRoundedRect:RECT     cornerRadius:RADIUS] addClip];
 [image drawInRect:RECT];
 UIImage* imageNew =     UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();
posted @ 2016-03-06 00:19  starainDou  阅读(417)  评论(0编辑  收藏  举报