Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已将默认文本设置为 UItextfield。现在我想更改默认文本的 alpha 值。如何才能做到这一点?
终于得到了答案:
[self.objTextFieldSearch setValue:[UIColor colorWithRed:255.0f/255.0f green:140.0f/255.0f blue:0.0f/255.0f alpha:0.5] forKeyPath:@"_placeholderLabel.textColor"];
提供所需的结果。