- 利用KVC修改
textField.placeholder = @"username is in here!";
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
- 搜索时,发现这篇文章写得很全,可以参考:
http://www.jianshu.com/p/e5c6c9b455dd
网友评论