iOS UIButton
来源:互联网 发布:ubuntu jdk rpm 编辑:程序博客网 时间:2024/03/29 16:27
今天给大家带来的是关于 button 的一个小属性,加边框
UIButton *myBtn = [UIButtonbuttonWithType:UIButtonTypeCustom];
[myBtn setTitleColor:[UIColorwhiteColor] forState:UIControlStateNormal];
myBtn.frame = CGRectMake(100, 100, 100, 100);
[myBtn setTitle:[imageAndtiltleArrayobjectAtIndex:i][@"title"]forState:UIControlStateNormal];
[myBtn setTitleColor:[UIColorwhiteColor] forState:UIControlStateNormal];
myBtn.titleLabel.textAlignment =NSTextAlignmentCenter;
myBtn.titleLabel.font = [UIFontsystemFontOfSize:14.0f];
myBtn.tag = i;
[myBtn addTarget:selfaction:@selector(setButtonBackGroundColor:)forControlEvents:UIControlEventTouchUpInside];
[myBtn.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
[myBtn.layer setCornerRadius:10];
[myBtn.layer setBorderWidth:1];//设置边界的宽度
//设置按钮的边界颜色
[myBtn.layer setBorderColor:[UIColor whiteColor].CGColor];
[self.topWaveViewaddSubview:myBtn];
- 【IOS】UIButton
- iOS-UIButton
- ios UIButton
- IOS UIButton
- UIButton---iOS
- ios-UIButton
- IOS UIButton
- ios uibutton
- ios-UIButton
- IOS UIButton。。。
- IOS UIButton
- IOS--UIButton
- iOS UIButton
- IOS -- UIButton 代码创建
- IOS 控件 UIButton button
- UIButton-IOS开发
- IOS ----UIButton用法详解
- iOS开发 UIButton专题
- break ,continue ,return 的区别及作用
- Eclipse常用快捷键汇总
- MVP模式
- restrict:限制指令的出现位置
- H5自定义属性设置和获取
- iOS UIButton
- 浅谈ACC测试建模
- oracle设置时间字段自动获取
- 最强PostMan使用教程(1)
- Android Studio使用gradle-experimental构建NDK工程(无需Android.mk、Application.mk文件)
- Android新建项目,或者导入项目出现R文件丢失,解决方案
- iOS基础——浅谈个人对协议、代理的理解
- 关于 curl 和wget 报错 couldn.t connect to host 问题的解决方法
- 简单封装Dozer, 实现深度转换Bean到Bean的Mapper.实现: