给button添加弧度的方法
2014-01-19 22:56
302 查看
avatarImage = [UIButton buttonWithType:UIButtonTypeCustom];
//给按钮加一个白色的板框
avatarImage.layer.borderColor = [[UIColor whiteColor] CGColor];
avatarImage.layer.borderWidth = 1.0f;
//给按钮设置弧度,这里将按钮变成了圆形
avatarImage.layer.cornerRadius = 25.0f;
avatarImage.backgroundColor = [UIColor redColor];
avatarImage.layer.masksToBounds = YES;
更多0
//给按钮加一个白色的板框
avatarImage.layer.borderColor = [[UIColor whiteColor] CGColor];
avatarImage.layer.borderWidth = 1.0f;
//给按钮设置弧度,这里将按钮变成了圆形
avatarImage.layer.cornerRadius = 25.0f;
avatarImage.backgroundColor = [UIColor redColor];
avatarImage.layer.masksToBounds = YES;
更多0
相关文章推荐
- 初中数学公式大全
- UIButton on the UIScrollView highlighted delayed
- 保持UIButton高亮状态
- iOS入门之UIButton/ViewController/UIImage
- iOS之简单的小车移动
- UITableView应用1
- 导航视图控制器中如何定义按钮以及视图之间的切换
- UIButton 详解
- UIButton详解
- 为iOS的弹出键盘(keyboard)加上隐藏按扭
- 想要将UIButton设置背景色
- UIButton 长按消息的实现
- button移动(或执行动画)之后无法响应点击事件的解决方法
- IOS开发(16)之UIButton控件
- IOS_自定义UIButton的子视图位置 EdgeInsets属性
- UIButton定义和设置圆角
- Objective-C ,ios,iphone开发基础:自定义控件:Eg: UIButton
- Objective-C ,ios,iphone开发基础:快速实现一个简单的图片查看器
- IOS第十七天——写一个基本的点击按钮更换Label文字的App
- UI控件之UIButton详解