【发布时间】:2015-03-03 02:12:16
【问题描述】:
所以我按照AppCoda 教程对个人资料图像的角进行了圆角处理,它工作得很好,除了一件事。无论图像在哪里进行了圆角处理,图像都会有一点渗出(尤其是在使用白色边框的情况下)。
self.imageview.image = image
self.imageview.layer.cornerRadius = 10.0
self.imageview.layer.borderWidth = 3.0
self.imageview.layer.borderColor = UIColor.whiteColor().CGColor
self.imageview.clipsToBounds = true
【问题讨论】:
-
只是一个建议:您是否尝试将视图的背景颜色设置为清晰颜色?
-
刚刚试过,没有效果
-
试试 imageview.layer.masksToBounds = YES;
-
我希望这有效....