{
// 给moreBtn 设置圆角
//方式一
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.moreBtn.bounds
byRoundingCorners:UIRectCornerBottomLeft |UIRectCornerTopLeft
cornerRadii:CGSizeMake(10, 10)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.moreBtn.bounds;
maskLayer.path = maskPath.CGPath;
self.moreBtn.layer.mask = maskLayer;
//方式二
//初始化 获取验证码Button描边颜色 圆角 描边宽度
// self.moreBtn.layer.cornerRadius = 10;
self.moreBtn.layer.borderWidth = 2;
self.moreBtn.layer.borderColor = ZKColor(248, 99, 133).CGColor;
// self.moreBtn.backgroundColor = [UIColor redColor];
[super layoutSubviews];
}
Button圆角
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 需求我们会经常遇到这样一个需求,给TableViewCell添加标签,例如:饿了么App中店铺会有,减、特、新等标...
- UIButton *button = [UIButtonbuttonWithType:UIButtonTypeSy...