如何更改Xib中的占位符文本颜色? [英] How to change placeholder text color in xib?

查看:66
本文介绍了如何更改Xib中的占位符文本颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在xib中更改占位符文本颜色?我已经尝试过关键路径的事情,但它给了我NSException.谁能帮忙.

How to change placeholder text color in xib ? I have tried key path thing but it is giving me NSException. Can anyone please help.

推荐答案

修改占位符文本颜色的最简单方法是通过Xcode故事板界面构建器.选择感兴趣的UITextField并在右侧打开身份检查器.单击用户定义的运行时属性"中的加号,然后添加一个新行,其中键路径"为placeholderLabel.textColor,类型"为颜色",值"为所需的颜色.

The easiest method to modify the placeholder text color is through the Xcode storyboard interface builder. Select the UITextField of interest and open the identity inspector on the right. Click on the plus symbol in the User Defined Runtime Attributes and add a new row with Key Path as placeholderLabel.textColor, Type as Color and Value to your desired color.

这篇关于如何更改Xib中的占位符文本颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆