【发布时间】:2014-08-26 12:44:09
【问题描述】:
我有一个 RoundImageView 扩展 UIImageView 并具有以下功能以使其圆形:
-(void) makeImageViewRounded {
//set the look of the image
self.layer.backgroundColor=[[UIColor blackColor] CGColor];
//self.layer.cornerRadius= self.frame.size.height /2;
self.clipsToBounds = YES;
self.layer.masksToBounds = YES;
self.layer.borderWidth=1.0;
self.layer.borderColor=[[UIColor grayColor] CGColor];
}
如何在边框和实际图像之间创建边距(填充)?我想公开self.layer.backgroundColor=[[UIColor blackColor] CGColor];中设置的颜色
【问题讨论】:
标签: ios uiimageview uiimage