设置某个视图其中一个角为圆角

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(120, 10, 80, 80)];spa

view.backgroundColor =[UIColor redColor];ci

[self.view addSubview:view];it

UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];margin

CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];word

maskLayer.frame = view.bounds;di

maskLayer.path = maskPath.CGPath;view

view.layer.mask = maskLayer;vi

相关文章
相关标签/搜索