【发布时间】:2012-02-07 22:37:57
【问题描述】:
所以我正在设置 UINavigationBar tintColor,这就是我得到的:
[navController.navigationBar setTintColor:[UIColor whiteColor]];
这怎么可能?如果有帮助,这里有更多信息:
【问题讨论】:
标签: iphone objective-c ipad uinavigationcontroller uinavigationbar
所以我正在设置 UINavigationBar tintColor,这就是我得到的:
[navController.navigationBar setTintColor:[UIColor whiteColor]];
这怎么可能?如果有帮助,这里有更多信息:
【问题讨论】:
标签: iphone objective-c ipad uinavigationcontroller uinavigationbar
我有一个UINavigationController,我自定义如下:
首先,想出一个 44 像素高的图像作为导航栏的背景。 (在这种情况下,如果您想使用 44 像素高的白色图像,那就可以了 --- 但如果您使用某种类型的垂直渐变,效果会更好)
其次,在您的AppDelegate 的didFinishLaunching 方法中使用以下代码。 (图片名为“background_44.png”。
// Set the background image for *all* UINavigationBars
UIImage *gradientImage44 = [[UIImage imageNamed:@"background_44.png"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
// Set the background image for *all* UINavigationBars
[[UINavigationBar appearance] setBackgroundImage:gradientImage44
forBarMetrics:UIBarMetricsDefault];
【讨论】:
我在我的项目中删除了该代码,工作正常。甚至改变了酒吧的风格和颜色。没问题。这行代码没问题,其他地方有问题或者是一些疯狂的故障。
【讨论】: