[英]iOS 7 — Storyboard default tint color
I have multiple storyboards in my app and for one specific storyboard I wish to have a different color scheme. 我的应用程序中有多个故事板,对于一个特定的故事板,我希望有不同的配色方案。 This may not be according to iOS 7 guidelines but nonetheless, I am wondering if there is a way to change the tint color for every UIControl for a particular storyboard.
这可能不符合iOS 7指南,但是,我想知道是否有办法改变特定故事板的每个UIControl的色调颜色。
Yes, if you go to the File inspector, you can set the global color per storyboard. 是的,如果您转到文件检查器,则可以设置每个故事板的全局颜色。 In fact, I don't think you can set the tint color for multiple storyboards at once (aside from doing it in code).
事实上,我认为你不能一次为多个故事板设置色彩(除了在代码中做)。
Select the File inspector: 选择文件检查器:
The second section looks like this: 第二部分看起来像这样:
Change the Global Tint, and that color will be the tint color for your entire storyboard. 更改全局色调,该颜色将是整个故事板的色调。
From Code Swift 3 来自Code Swift 3
you can change tint for all view using one line of code 您可以使用一行代码更改所有视图的色调
UIView.appearance().tintColor = UIColor.green
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.