标签:
1
2
|
self .blueView.layer.cornerRadius = 5.f; self .blueView.layer.masksToBounds = YES ; |
1
2
3
4
5
6
7
|
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: self .blueView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomLeft cornerRadii:CGSizeMake(20, 0)]; CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; maskLayer.frame = self .blueView.bounds; maskLayer.path = maskPath.CGPath; self .blueView.layer.mask = maskLayer; self .blueView.layer.cornerRadius = 5.f; self .blueView.layer.masksToBounds = YES ; |
1
2
3
4
|
self .layer.cornerRadius = 6; self .layer.masksToBounds = YES ; // 裁剪 self .layer.shouldRasterize = YES ; // 缓存 self .layer.rasterizationScale = [UIScreen mainScreen].scale; |
标签:
原文地址:http://www.cnblogs.com/-ios/p/5583501.html