ios - 使用 Userattributes 更改 UITextField 的占位符文本颜色?

标签 ios objective-c uitextfield

我想从用户属性(界面生成器)更改占位符颜色,因为我不想子类化我的 UITextfield 等...我在互联网上搜索并找到了这个“_placeholderLabel.textColor”是的,它以编程方式运行良好[ self.tfEmail setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"]; 但我想在界面生成器的用户属性中使用它。

最佳答案

尝试删除“_”,

Image

适合我。

关于ios - 使用 Userattributes 更改 UITextField 的占位符文本颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21156009/

相关文章:

iphone - UIActionsheet Ipad/Iphone

ios - 如何在 UILabel 文本上设置边缘样式

ios - 将 `UIImageView` 设置为不在自定义 UITableViewCell 上突出显示

ios - 输入键盘按键时 UITextField 不更新

ios - 如何根据缩放级别为 map 锻炼相关注释?

iphone - 在没有 SIM 卡的 iPhone 设备上测试

ios - 来自 UITableviewcell 的弹出窗口不起作用

ios - Sprite 套件中的 UIImageView

iphone - 是否可以从 UITextField 自定义键盘?

ios - 如何获取或设置值以指定 UITextField?