修改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"];
  4. 直接使用KVC模式,改变参数的值很方便
posted @ 2015-03-30 10:09  蓝色的风1203  阅读(259)  评论(0编辑  收藏  举报