[IOS]UIButton&UIImageView导圆角设边框
来源:互联网 发布:最近很火的网络歌曲男 编辑:程序博客网 时间:2024/06/05 03:21
[IOS]UIButton&UIImageView导圆角设边框
UIButton部分:
UIButton *tempBit = [[UIButton alloc] init]; [tempBit setFrame:CGRectMake(50, 50, 54, 54)]; //导圆角 tempBit.layer.masksToBounds = YES; [tempBit.layer setCornerRadius:27]; //添加边框 设置边框颜色 [tempBit.layer setBorderWidth:2.0]; [tempBit.layer setBorderColor:[[UIColor redColor] CGColor]];
UIImageView部分:
UIImageView *tmepImgv = [[UIImageView alloc] init]; [tmepImgv setFrame:CGRectMake(50, 100, 54, 54)]; //导圆角 设置masksToBounds是因为若imageView有添加图片时图片会超出边框 tmepImgv.layer.masksToBounds = YES; [tmepImgv.layer setCornerRadius:27]; //添加边框 设置边框颜色 [tmepImgv.layer setBorderWidth:2.0]; [tmepImgv.layer setBorderColor:[[UIColor redColor] CGColor]];
0 0
- [IOS]UIButton&UIImageView导圆角设边框
- IOS开发----UIImageView 和 UIButton
- iOS中 UIButton和UIImageView
- iOS UILabel UIButton UIImageView使用方法
- IOS 圆形头像 UIButton边框 按钮边框
- iOS程序-UIButton和UIImageView的区别
- iOS UI篇 学习笔记 UIButton,UIImageView
- iOS之UI随笔-UIButton与UIImageView
- iOS-UIButton和UIImageView的区别
- IOS UIButton &UIImageView 之间的区别
- IOS中UIButton和UIImageView的区别
- IOS UIImageview 添加边框 或者设置成圆角
- iOS UIImageView加边框和圆角
- ios--UIImageView添加边框和阴影
- iOS--UIImageView添加边框和阴影
- [IOS]UIButton 圆角/边框设置 相关
- iOS-TextView、UIButton加边框,加下划线
- Ios UIButton 设置圆角和边框
- C/C++堆栈
- hibernate 数据库及时释放连接池
- 序列化反序列化的使用
- 二维码生成算法及c#实现(附源码)
- 作业1
- [IOS]UIButton&UIImageView导圆角设边框
- Hive:简单查询不启用Mapreduce job而启用Fetch task
- Hibernate实战_笔记19(实现映射之XDoclet)
- xcode5.1下编译报错误解决方法(第三方库不支持arm64)
- Python获取CPU使用率、内存使用率、网络使用状态
- Android给TextView,EditText等设置边框
- win8 完全禁用uac的方法
- Android数据的四种存储方式SharedPreferences、SQLite、Content Provider和File (四) —— ContentProvider
- socket例程