0
的UIImageView圆形边框我用这个代码来创建圆的UIImageView:保证金
-(void) makeImageViewRounded {
self.layer.backgroundColor=[[UIColor greenColor] CGColor];
self.layer.cornerRadius= self.frame.size.height /2;
self.clipsToBounds = YES;
self.layer.masksToBounds = YES;
self.layer.borderWidth=1.5;
self.layer.borderColor=[[UIColor grayColor] CGColor];
}
这是结果(忽略的背景,如果JPG ..它从圆角的边框开始):
我想创建图像和圆角的边框之间的余量这一结果(忽略的背景,如果JPG ..它从圆角的边框开始):
我该如何做到这一点?
添加保证金 – rptwsthi 2014-09-10 14:40:36
@rptwsthi另一个图层蒙版,可以请你提供一些额外的代码? – 2014-09-10 14:45:06