UIBezierPath加圆角
来源:互联网 发布:免费自助建站平台源码 编辑:程序博客网 时间:2024/06/15 21:30
UIButton *button = [UIButtonbuttonWithType:UIButtonTypeCustom];
button.backgroundColor = [UIColorredColor];
button.frame =CGRectMake(0,0, 100,44);
CGRect bounds = button.bounds;
UIBezierPath *path = [UIBezierPathbezierPathWithRoundedRect:bounds cornerRadius:frame.size.width/2];
CAShapeLayer *shapeLayer = [CAShapeLayerlayer];
shapeLayer.frame = bounds;
shapeLayer.path = path.CGPath;
button.layer.mask = shapeLayer;
0 0
- UIBezierPath加圆角
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath
- UIBezierPath学习
- 营销 - 数据
- Android中获取应用程序(包)的信息-----PackageManager的使用(一)
- 采用Atlas+Keepalived实现MySQL读写分离、读负载均衡
- Linux下安装JDK-(rpm版)
- mysql 利用触发器(Trigger)让代码更简单
- UIBezierPath加圆角
- emoji 原生表情解析成对应表情包png
- FICO年结完全手册
- 小Printf的编程故事:第一章
- osmdroid基础教程(一)
- java基础知识
- Android开发-加载公用布局(如公用标题栏)
- xUtils框架
- iOS开发篇(四)Reachability三方框架的使用与介绍