您的位置:首页 > 产品设计 > UI/UE

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"];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: