ios CALayer之图片剪切

1 self.iconView.layer.borderWidth = 10;
2     self.iconView.layer.borderColor = [UIColor purpleColor].CGColor;
3     self.iconView.layer.cornerRadius = 10;
4     // 设置超出主图层的部分剪切掉
5     //    self.customView.clipsToBounds = YES;
6     self.iconView.layer.masksToBounds = YES;
7     self.iconView.layer.bounds = CGRectMake(0, 0, 200, 200);
8     self.iconView.layer.position = CGPointMake(100 , 100);

posted @ 2016-01-23 23:41  xiaocaoera  阅读(536)  评论(0编辑  收藏  举报