textField.placeholder = @"请输入验证码";
[textField setValue:[UIColor blueColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:14] forKeyPath:@"_placeholderLabel.font"];
_telTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;;
修改textField的placeholder的字体颜色、大小[高亮]
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 利用KVC修改 搜索时,发现这篇文章写得很全,可以参考:http://www.jianshu.com/p/e5c6...
- textField.placeholder = @"username is in here!";[textFiel...
- 在搭建UI界面长长用到textField,有时候就需要修改textField的placeholder的字号和颜色我...
- textField.placeholder=@"username is in here!";[textFields...
- textField.placeholder=@"username is in here!"; [textField...