更改默认的 UITabBarController 背景颜色
因此,我有一个正在运行的 iPhone 应用程序,该应用程序由 UITabBarController 在最高级别进行控制。它是您在许多 iPhone 应用程序中看到的底部默认的黑色选项卡栏。我对 iPhone SDK 编程有点陌生,我知道我见过其他应用程序在底部的选项卡栏有自己的背景颜色。我不确定他们是否像我一样使用此选项卡栏作为他们应用程序的主控制器,但问题适用于此:
如何更改应用程序中主 UITabBarController 的背景颜色?我想将其更改为深绿色,类似于我在应用程序中放置的导航栏和标签的颜色。我觉得很奇怪,苹果如何让改变导航栏(而不是控制器)和其他东西的颜色变得非常容易,但是当涉及到控制器(在本例中是选项卡栏控制器)时,我找不到单一的方法来实现这干净高效。
So I have an iPhone application running that is controlled at the highest level by a UITabBarController. It is the default black Tab Bar at the bottom that you see in many iPhone apps. I am kind of new to iPhone SDK programming, and I know I have seen other apps that have their own background color for the Tab Bar at the bottom. I am not sure if they are using this tab bar as I am, as the main controller for their app, but the question applies to this:
How do I change the background color of the main UITabBarController in my application? I wanted to change it to a dark shade of green similar to the colors of the navigation bars and labels I have placed in my app. I find it weird how Apple makes it really easy to change the color of Navigation Bars (not controllers), and other things, but when it comes to controllers (in this case a Tab Bar Controller), I cannot find a single way to implement this cleanly and efficiently.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以做这样的事情。
You can do something like this.