iOS设置局部圆角

UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_logoback.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(X(16), X(16))];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = _logoback.bounds;
maskLayer.path = maskPath.CGPath;
_logoback.layer.mask = maskLayer;

你可能感兴趣的:(iOS设置局部圆角)