更改自动生成的导航栏的颜色
我的应用程序的选项卡栏中有多个选项卡(超过 5 个),当发生这种情况时,xcode 会自动将最后一个选项卡设为“更多”选项卡,并将最后一个选项卡放入其中。问题是,我在其他选项卡中的导航栏的颜色与任何默认颜色不同,并且自动生成的“更多”选项卡是默认的蓝色。我想知道是否有什么办法可以改变这个?
非常感谢
山姆
I have multiple tabs (more than 5) in the tab bar in my app, and when this happens, xcode automatically makes the last tab a "more" tab and puts the last tabs in it. The problem is, I have navigation bars in the other tabs that are a different color than any of the default colors, and the automatically generated "more" tab is the default blue color. I was wondering if there was any way to change this?
Thanks a lot
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
或
请参阅此答案以自定义“编辑”模式视图控制器的导航栏颜色: 链接
or
See this answer for customizing the navigation bar colour of the "edit" modal view controller: Link
这对我来说就像您实际上想要更改所选选项卡项目的颜色一样。如果是这样,那么这篇文章有无数的解决方案: UITabBar 中的自定义颜色
否则,如果您的意思是什么当您在标题中写入时,您可以通过更改
tintColor
属性来更改导航栏的颜色。This reads to me like you actually want to change the color of a selected tabbaritem. If so, then this post has myriad solutions: Custom colors in UITabBar
Otherwise, if you mean what you write in the title, you can change the color of a navigation bar by changing the
tintColor
property.[[UINavigationBar外观]setBarStyle:UIBarStyleBlackOpaque];
将其放在 AppDelegate 下 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
place this in the AppDelegate under - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions