ios 7.1 UITextField着色颜色在情节提要中保持不变 [英] ios 7.1 UITextField tint color doesn't change in storyboard

查看:87
本文介绍了ios 7.1 UITextField着色颜色在情节提要中保持不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到iOS 7.0,文本字段的颜色都更改为您在情节提要中设置的颜色. 从iOS 7.1开始,除非您以编程方式进行操作,否则它将不会更改.

Up till iOS 7.0, the text field tint color changed to the color you set in storyboard. As of iOS 7.1, it won't change unless you do it programmatically.

这是一个错误吗?有人知道吗?

Is this a bug? Does anyone know?

推荐答案

以下是使用情节提要的解决方案.

Here is the solution to work with storyboard.

1)转到身份检查器"

1) Go to "Identity Inspector"

2)在用户定义的运行时属性"中添加"tintColor"属性

2) Add "tintColor" attribute in "User Defined Runtime Attributes"

3)设置所需的颜色.

3) Set the desired color.

就这样.

或者,如果您想在整个应用程序的所有文本字段中使用相同的颜色,请使用juse,

Or if you want to use same tint color for all textfields throughout the app, juse use,

[[UITextField外观] setTintColor:color];

[[UITextField appearance] setTintColor:color];

这篇关于ios 7.1 UITextField着色颜色在情节提要中保持不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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