我是否忽略了使用Global Tint设置应用程序整体色彩的东西?
在IOS 7.1更新后,今天在IOS 7.06中运行的应用程序突然发生了变化.
基本故事板,基于标签的应用程序,全局色调(橙色)设置在IB的故事板中.
今天更新到IOS 7.1 IPhone 5S,它显示标准的蓝色色调
iPhone 4 IOS 7.06,相同的应用程序TabBar色调是应有的.
不得不设置如下
[[UITabBar appearance] setTintColor:[UIColor orangeColor]];
Run Code Online (Sandbox Code Playgroud)
在TabBarControllers ViewDidLoad中纠正问题.
难道我有别的东西设置不正确吗?
我有一个UITabBarController,我使用此代码来设置选择指标图像:
let selectedBG = UIImage(named:"tabbarbgtest.png")?.resizableImageWithCapInsets(UIEdgeInsetsMake(0, 0, 0, 0))
UITabBar.appearance().selectionIndicatorImage = selectedBG
Run Code Online (Sandbox Code Playgroud)
但是图像并没有填满整个空间 - 见下图:
图像只是一个红色正方形,在82x49px上有一个解决方案,但是如果图像更宽,它仍然无法填满整个空间.希望你们能帮忙 - 谢谢.
我可以改变一个特定的背景颜色UITabBarItem的UITabBar?
我知道如何更改所选背景的所有背景,使用:
[[UITabBar appearance] setBarTintColor:[UIColor redColor]];
[[UITabBar appearance] setTintColor:[UIColor blueColor]];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor yellowColor]];
Run Code Online (Sandbox Code Playgroud)
但是如果没有子类化,它只能用于一个项吗?
谢谢