iOS添加圆角好方法

来源:互联网 发布:mmd保存动作数据 编辑:程序博客网 时间:2024/06/06 03:02

UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale); [[UIBezierPath bezierPathWithRoundedRect:RECT     cornerRadius:RADIUS] addClip]; [image drawInRect:RECT]; UIImage* imageNew =     UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();

一般我们都能想到通过layer来添加圆角,其实那是比较消耗性能的,尤其是列表cell里面控件使用

上面是一种比较好的方法



1 0
原创粉丝点击