修改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模式,改变参数的值很方便
握不住的沙,干脆扬了它。
原文地址:https://www.cnblogs.com/zj901203/p/4377269.html