如何在storyboard中创建圆形uiimageview
1个回答
展开全部
self.outimgViewCusActivity = [[UIImageView alloc]initWithFrame:CGRectMake(20, 115, 54, 54)];
[self.backgroundViewCusActivity addSubview:self.outimgViewCusActivity];
self.outimgViewCusActivity.layer.masksToBounds=YES;
self.outimgViewCusActivity.layer.cornerRadius=27.0; //最重要的是这个地方要设成imgview高的一半
// self.outimgViewCusActivity.layer.borderWidth=1.0;
self.outimgViewCusActivity.backgroundColor = [UIColor whiteColor];
[outimgViewCusActivity release];
[self.backgroundViewCusActivity addSubview:self.outimgViewCusActivity];
self.outimgViewCusActivity.layer.masksToBounds=YES;
self.outimgViewCusActivity.layer.cornerRadius=27.0; //最重要的是这个地方要设成imgview高的一半
// self.outimgViewCusActivity.layer.borderWidth=1.0;
self.outimgViewCusActivity.backgroundColor = [UIColor whiteColor];
[outimgViewCusActivity release];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询