首页 > 其他 > 详细

关于图片边框或控件圆角的设置

时间:2017-02-10 17:25:39      阅读:187      评论:0      收藏:0      [点我收藏+]

一、控件圆角的设置:

self.profileImageView.layer.cornerRadius = 10.0f; 设置圆角,非正圆

self.profileImageView.clipsToBounds= YES; 将圆角多余部分切除

headImgView.layer.cornerRadius = headImgView.bounds.size.width/2;  设置圆角,正圆  ;xib适配时可能出现问题,建议代码创建控件

headImgView.layer.masksToBounds = YES;  将圆角多余部分切除

 

二、控件边框的设置:

self.profileImageView.layer.borderWidth = 3.0f;

self.profileImageView.layer.borderColor = [UIColor whiteColor].CGColor;

 

三、参考链接:

http://ju.outofmemory.cn/entry/76525

关于图片边框或控件圆角的设置

原文:http://www.cnblogs.com/sunny-ll/p/6387096.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!