UIView 的部分圆角的设定

 UIBezierPath*maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:(UIRectCornerTopRight | UIRectCornerBottomRight) cornerRadii:CGSizeMake(7.5,7.5)];//圆角大小
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = view.bounds;
maskLayer.path = maskPath.CGPath;
view.layer.mask = maskLayer;

}

(UIRectCornerTopRight | UIRectCornerBottomRight) 这个控制圆角的位置

猜你喜欢

转载自blog.csdn.net/goods_boy/article/details/79571627
今日推荐