随意逛的时候,发现的一个意思的东西(改变placeholder的颜色)

用setvilue forkey 的方法

[(UITextField *)textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];

原文地址:https://www.cnblogs.com/naizui/p/5112544.html