3.5“ios7:
3.5“ios 6:
4“ios7:
我想要一个不透明的标签栏,我在任何地方都设置了它:
在标签栏:
在导航控制器上: - 取消选中“半透明”
在4“我没有半透明的强制。我怎么能逃脱3.5”,ios7版本?
编辑:
This方法不起作用。
EDIT2:
This解决方案也不起作用。
EDIT3:
编辑4: 我认为这是ios中的一个错误,我不知道在哪里挖,因为所做的更改看起来像这样:
3.5“ios 6.1 - 观察上部线被移除:
4“ios 7: - 观察者上部:完全黑色 - 如同背景图像的底部部分。
3.5“ios 7仍然相同!该怎么办?:(
在.plist中有一个“Nib文件基名:MainVindow。
我已经设置了TabBarController并链接到AppDelegate。在didFinishLaunchingWithOptions
,我正在进行此设置。也许其他地方应该是?
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")){
[self.tabBarController.tabBar setClipsToBounds:YES];
UIImage* tabBarBackground = [UIImage imageNamed:@"transparentImage.png"];
[[UITabBar appearance] setShadowImage:tabBarBackground];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
UITabBar *tabBar = self.tabBarController.tabBar;
tabBar.tintColor = [UIColor yellowColor];
tabBar.barStyle = UIBarStyleBlack;
}
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
applicationDidBecomeActive
答案 0 :(得分:1)
尝试设置背景图片。它对我有用。
UITabBar *tabBar = [UITabBar appearance];
[tabBar setBackgroundImage:[UIImage imageNamed:@"tabbar-background"]];