设置placeholder的字体颜色

//设置字体颜色

[self.searchTextField setValue:[UIColor colorWithRed:0.50 green:0.50 blue:0.50 alpha:1.0] forKeyPath:@"_placeholderLabel.textColor"];
   

//设置字体大小

[self.searchTextField setValue:[UIFont systemFontOfSize:15] forKeyPath:@"_placeholderLabel.font"];

原文地址:https://www.cnblogs.com/sunjianfei/p/5534978.html