首页 > 代码库 > 给UIImageView加上圆角效果

给UIImageView加上圆角效果

 

效果图:

 

代码:

- (void)viewDidLoad{    [super viewDidLoad];    // Do any additional setup after loading the view.            UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 200, 200)];    imageView.backgroundColor=[UIColor greenColor];    imageView.layer.cornerRadius = 10;    imageView.clipsToBounds = YES;    [self.view addSubview:imageView];    }

 

给UIImageView加上圆角效果