【发布时间】:2015-02-10 14:35:46
【问题描述】:
刚刚这样做:
self.imageView.backgroundColor = color1;
self.imageView.layer.masksToBounds = YES;
self.imageView.layer.borderColor = color1;
self.imageView.layer.borderWidth = 3.0;
这是问题的截图:
我可以看到图片、边框和图片片段超出边框...
我该如何解决?
【问题讨论】:
-
你是如何添加你的面具的?好像蒙版图片有问题
-
@CihanT。没有掩蔽。只是
UIImageView,在填充UIView前面有彩色边框。 -
您是否尝试过直接在
UIImageView上使用border 和cornerRadius 执行此操作? IE。imv.layer.cornerRadius = width/2,masksToBounds = YES, & 设置边框宽度,边框颜色? -
@JackWu 是直接做的 :)
-
Right..在这种情况下,放入
UIView并在该视图上设置半径和边框的解决方法可能会起作用。我想我以前做过……
标签: ios uiimageview calayer