简体   繁体   English

如何在快速的tvOS中更改搜索栏文本的颜色

[英]How to change search bar text color in swift tvOS

I am facing the strange problem with Xcode 8.0. 我面临着Xcode 8.0的奇怪问题。 When i deploy the same code in Xcode 7.3 the search bar text color by default white, and deploy with Xcode 8.0 the search bar text color by default black. 当我在Xcode 7.3中部署相同的代码时,搜索栏文本颜色默认为白色,而在Xcode 8.0中部署时搜索栏文本颜色默认为黑色。 My requirement is that i should want to change the search bar text color. 我的要求是,我应该要更改搜索栏文本的颜色。

In Xcode 8 and tvOS 10,  has introduced light and dark interface styles. 在Xcode 8和tvOS 10中,引入了明暗接口样式。 So, if you're using built in components, these components will adapt to user's interface style preference. 因此,如果您使用内置组件,则这些组件将适应用户的界面样式首选项。 However, you can opt not to adapt to this change by adding "User Interface Style" (either "Dark" or "Light") in Project > Targets > Info 但是,您可以选择不适应此更改,方法是在“ Project > Targets > Info ”中添加“用户界面样式”(“深色”或“浅色”)

I hope this helps. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM