使用Userattributes更改UITextField的占位符文本颜色? [英] Change UITextField's placeholder text color using Userattributes?
本文介绍了使用Userattributes更改UITextField的占位符文本颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从用户属性(界面构建器)更改Place holder颜色,因为我不想继承我的UITextfield等...我在互联网上搜索并发现这个_placeholderLabel.textColor是的,这样可以很好地编程 [self.tfEmail setValue:[UIColor whiteColor] forKeyPath:@_ placeholderLabel.textColor];
但我想在界面构建器的用户属性中使用它。
I want to change Place holder color from user attributes (interface builder) because i dont want to subclass my UITextfield etc... i searched on internet and found this "_placeholderLabel.textColor" Yes this works well Programmatically [self.tfEmail setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
but i want to use it in user attributes in interface builder.
推荐答案
尝试删除'_',
适合我。
这篇关于使用Userattributes更改UITextField的占位符文本颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文