设置 UINavigationBar TintColor 仅设置其后退按钮颜色
所以我正在设置 UINavigationBar 色调颜色,这就是我得到的:
[navController.navigationBar setTintColor:[UIColor whiteColor]];
这怎么可能?如果有帮助的话,这里还有一些更多信息:
SO I am setting a UINavigationBar tintColor and here's what I get:
[navController.navigationBar setTintColor:[UIColor whiteColor]];
How is this even possible? Here's some more info if it helps:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有一个
UINavigationController
,我对其进行了如下自定义:首先,拿出一个 44 像素高的图像作为导航栏的背景。 (在这种情况下,如果您想使用 44 像素高的白色图像,那就可以了 --- 但如果您使用某种类型的垂直渐变,它看起来会好得多)
其次,在您的
AppDelegate
的didFinishLaunching
方法。 (该图像名为“background_44.png
”。I've got a
UINavigationController
that I customize as follows:First, come up with a 44px-high image as the background for the nav bar. (In this case, if you wanted to use a 44px-high white image, that'd do the trick --- but it'll look much nicer if you use some type of vertical gradient)
Second, use the following code in your
AppDelegate
'sdidFinishLaunching
method. (The image is called "background_44.png
".我将该代码放入我的项目中,工作得很好。甚至改变了酒吧的风格和颜色。没问题。这行代码很好,其他地方有问题或者是一些疯狂的故障。
I dropped that code in my project, worked fine. Even changed bar styles and colors. No problem. This line of code is fine, there is an issue somewhere else or its some crazy glitch.