开发细节总结

来源:互联网 发布:网络连接图标不见了 编辑:程序博客网 时间:2024/05/16 12:48

1、设置视图指定位置圆角

UIBezierPath *maskPath =[UIBezierPath bezierPathWithRoundedRect:_editButton.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight  cornerRadii:CGSizeMake(60,60)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = _editButton.bounds;
    maskLayer.path = maskPath.CGPath;
    _editButton.layer.mask = maskLayer;
0 0
原创粉丝点击