iOS UIButton 给某个角设置为圆角的方法
2014-12-24 15:06
381 查看
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_locaBtn.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(10.0, 10.0)];
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = _locaBtn.bounds;
maskLayer.path = maskPath.CGPath;
_locaBtn.layer.mask = maskLayer1;
这个是给button设置了又上角和又下角设置了圆角。
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = _locaBtn.bounds;
maskLayer.path = maskPath.CGPath;
_locaBtn.layer.mask = maskLayer1;
这个是给button设置了又上角和又下角设置了圆角。
相关文章推荐
- iOS设置圆形(圆角)UIView、UIButton的简单方法
- IOS--UIViewUIButtonUIImageView设置圆角、阴影、边框的方法
- iOS开发--UIButton 设置圆角 边框颜色 点击回调方法
- IOS--UIViewUIButtonUIImageView设置圆角、阴影、边框的方法
- IOS成长之路-UIButton定义和设置圆角
- UIButton 设置圆角 边框颜色 点击回调方法
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- iOS学习——UIView圆角图片的设置方法
- UIView,UIButton,UIImageView等视图设置圆角,设置阴影,设置边框的方法
- Ios开发Swift自定义UIbutton增加一个能设置高亮状态下背景颜色的方法
- IOS 笔记 - 利用UIImage的stretchableImageWithLeftCapWidth方法给UIButton设置背景
- IOS成长之路-UIButton定义和设置圆角
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- iOS应用开发中UIView添加边框颜色及设置圆角边框的方法
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- iOS给UIButton设置圆角
- UIButton 设置圆角 边框颜色 点击回调方法 &&图片在右文字在左
- iOS设置圆角图片的方法及对比
- iOS: 使用故事板和xib设置按钮圆角方法