1.1(oc)UITextField placeholder (占位符 文字颜色、大小设置)

宏定义色值

#define QYColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
 //占位符 字体
[textField setValue:QYColor(224, 224, 224) forKeyPath:@"_placeholderLabel.textColor"];
//  颜色
[textField setValue:[UIFont systemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];

你可能感兴趣的:(1.1(oc)UITextField placeholder (占位符 文字颜色、大小设置))