ios修改textField的placeholder的字体颜色、大小

 
  1. textField.placeholder = @"username is in here!";  
  2. [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];  
  3. [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];  

这里是使用了KVC的方式,是不是很简单呢?呵呵!

posted @ 2015-06-17 11:48  糖醋排骨_zwt  阅读(240)  评论(0编辑  收藏  举报