【发布时间】:2011-10-31 07:25:50
【问题描述】:
我在 Xcode 4.2 和雪豹中制作了一个 iPhone 应用程序,其中我通过实现以下代码设置了导航栏和标签栏背景颜色
CGRect frame = CGRectMake(0.0, 0.0, self.view.bounds.size.width, 48);
UIView *v = [[UIView alloc] initWithFrame:frame];
[v setBackgroundColor:[UIColor colorWithRed:1.0f/255.0f green:140.0f/255.0f
blue:131.0f/255.0f alpha:1.0f]];
[[self.tabBarController tabBar] insertSubview:v atIndex:0];
[v release];
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:1.0f/255.0f
green:125.0f/255.0f blue:131.0f/255.0f alpha:1.0f];
它工作正常,但现在如果我在 ios 5 和 xcode 4.2 中运行此应用程序,导航栏颜色设置但标签栏背景颜色未设置
如何在 iOS 5 中设置标签栏的背景颜色?如果有人知道,请帮助我。
非常感谢。
【问题讨论】:
-
是的,它正在工作......非常感谢......
标签: iphone