iOS-TextView、UIButton加边框,加下划线
来源:互联网 发布:沈阳seo顾问 编辑:程序博客网 时间:2024/04/30 03:12
textview对象.layer.borderWidth = 5; //必须设置宽度,否则加不上
textview对象.layer.cornerRadius = 4;//圆角弧度
signBtn.frame = CGRectMake(0, 0, 80, 40);
[signBtn.layer setMasksToBounds:YES];
[signBtn.layer setCornerRadius:10.0]; //设置矩形四个圆角半径
[signBtn.layer setBorderWidth:1.0]; //边框宽度
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 1, 0, 0, 1 });
[signBtn.layer setBorderColor:colorref];//边框颜色
[signBtn setTitle:@"还 原" forState:UIControlStateNormal];//button title
[signBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];//title color
[signBtn addTarget:self action:@selector(buttonDonwRecover:) forControlEvents:UIControlEventTouchUpInside];//button 点击回调方法
signBtn.backgroundColor = [UIColor whiteColor];
- (void)buttonDonwRecover:(id)sender
{
UIButton *btn = (UIButton *)sender;
}
//加下划线
NSMutableAttributedString *str = [[NSMutableAttributedStringalloc] initWithString:self.resgiterButton.titleLabel.text];
NSRange strRange = {0,[strlength]};
[str addAttribute:NSUnderlineStyleAttributeNamevalue:[NSNumbernumberWithInteger:NSUnderlineStyleSingle]range:strRange];
[self.resgiterButtonsetAttributedTitle:str forState:UIControlStateNormal];
- iOS-TextView、UIButton加边框,加下划线
- UIButton加彩色边框
- Android TextView加下划线
- textview加下划线
- android Textview加下划线
- android Textview加下划线
- textview 加下划线
- android Textview加下划线
- TextView加下划线
- TextView加下划线
- textview加下划线
- TextView加下划线
- iOS 开发之给UILabel 或者 UIButton标题加下划线
- textview加边框
- textView加边框
- textview加边框
- TextView加边框
- 给TextView加边框
- IOS项目集成ShareSDK实现第三方登录、分享、关注等功能
- 很多win8.1的用户在装了SQL server2008后在连接数据库时经常出现错误
- 没有 Android世界会是怎么样的
- Entoloma saundersii Mushroom
- 一元二次方程
- iOS-TextView、UIButton加边框,加下划线
- 全球最大的搜索引擎排名~~~~~~~~!!!!
- 每个Mac OS X 命令行用户应当知道的八个终端工具
- 做一个可删除的淘宝购物页面
- 用NPOI把数据库内容导入到Excel中实例(NPOI版本2.0)
- MyBatis传入多个参数的问题
- ======Gson======
- (1) Mysql ---- ABC 数据库基本操作、数据类型和运算符、函数 《MYSQL 5.5从零开始学》笔记
- 服装020 远远不只是一个APP