UIButton 的不同设置和UITextField 的默认值(修改默认值)
2015-10-25 00:00
429 查看
UIButton *btn31 = [[UIButton alloc]initWithFrame:CGRectMake(200, 0, 65, 40)];
[btn31 setTitle:@"获取验证码" forState:UIControlStateNormal];
[btn31.titleLabel setFont:[UIFont systemFontOfSize:12.0]];
[btn31 setTitleColor:[UIColor colorWithRed:19/255.0f
3ff0
green:181/255.0f blue:224/255.0f alpha:1] forState:UIControlStateNormal];
[field addSubview:btn31];
UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn2 setFrame:CGRectMake(10, 100, 300, 40)];
[btn2 setTitle:@"登录" forState:UIControlStateNormal];
[btn2.titleLabel setFont:[UIFont systemFontOfSize:17.0]];
[btn2.titleLabel setTextAlignment:NSTextAlignmentCenter];
[btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_nor@2x.png"] forState:UIControlStateNormal];
[btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_press@2x.png"] forState:UIControlStateHighlighted];
[field3 setPlaceholder:@"验证码"];
[field3 setValue:[UIColor colorWithRed:176/255.0f green:176/255.0f blue:176/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
[btn31 setTitle:@"获取验证码" forState:UIControlStateNormal];
[btn31.titleLabel setFont:[UIFont systemFontOfSize:12.0]];
[btn31 setTitleColor:[UIColor colorWithRed:19/255.0f
3ff0
green:181/255.0f blue:224/255.0f alpha:1] forState:UIControlStateNormal];
[field addSubview:btn31];
UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn2 setFrame:CGRectMake(10, 100, 300, 40)];
[btn2 setTitle:@"登录" forState:UIControlStateNormal];
[btn2.titleLabel setFont:[UIFont systemFontOfSize:17.0]];
[btn2.titleLabel setTextAlignment:NSTextAlignmentCenter];
[btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_nor@2x.png"] forState:UIControlStateNormal];
[btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_press@2x.png"] forState:UIControlStateHighlighted];
[field3 setPlaceholder:@"验证码"];
[field3 setValue:[UIColor colorWithRed:176/255.0f green:176/255.0f blue:176/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
相关文章推荐
- UIView 设置边框颜色 和 UILabel 的设置
- 给uiview 添加边框以及圆角
- easyui-datagrid的url中的中文问题
- 每次保存之后build workspance 速度很慢的解决办法
- IOS--UIAlertViewDelegate对对话框的事件处理方法
- IOS-- UIAlertView(对话框)
- IOS---UIActivityIndicatorView
- 二、文件与目录
- The Dole Queue 约瑟夫环 模拟
- 从头认识java-3.2 return break continue
- 从头认识java-3.2 return break continue
- DP-POJ-2533-Longest Ordered Subsequence
- boost::lockfree::queue记录
- EasyUI - NumberBox组件
- LeetCode60——Permutation Sequence
- LeetCode之Unique Binary Search Trees & Unique Binary Search Trees II
- 知识库系统confluence5.8.10 安装与破解
- 用UIButton实现各种图文结合功能
- Android build.prop 添加自定义项 及使用
- 函数的返回值value的二进制位模式从左到右翻转后的值