您的位置:首页 > 移动开发 > IOS开发

IOS 改变提示placeholder颜色和大小

2016-03-16 10:05 537 查看
_restPwdTF = [[UITextField alloc] initWithFrame:CGRectMake(20, 10, _restBgView.frame.size.width-100, 30)];

_restPwdTF.placeholder = @"我是华丽丽的提示文本”;

_restPwdTF.secureTextEntry = YES;

[_restPwdTF setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];//颜色

[_restPwdTF setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];//大小

_restPwdTF.alpha = 0;
_restPwdTF.backgroundColor = colorwithrgb(234, 234, 234, 1);

_restPwdTF.layer.cornerRadius = 10;

_restPwdTF.layer.masksToBounds = YES;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息