iphone - 标签栏的背景色更多按钮 View

标签 iphone objective-c ios ios4

Can we change background color of this view?

我想改变这个 View 的颜色。我想要标签栏更多按钮 View 颜色与应用程序颜色相同,而不是白色。这怎么可能。

最佳答案

为此,您必须自定义 moreNavigationController。一种解决方案是子类化您的 UITabBarController 并在 - (void)viewDidLoad 方法上添加以下内容。

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UINavigationController *moreController = self.moreNavigationController;
    //if u want to custamize navigationBar u can customize
    //moreController.navigationBar

    if ([moreController.topViewController.view isKindOfClass:[UITableView class]]) {
        //Custamize your tableview here
        UITableView *tableView = (UITableView *)moreController.topViewController.view;
        //Change the color of tableView
        [tableView setBackgroundColor:[UIColor redColor]];

        moreController.topViewController.view = tableView;
    }
}

希望对你有帮助

要自定义 tabBarItem,您可以按照其他答案进行操作。

关于iphone - 标签栏的背景色更多按钮 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13264324/

相关文章:

iphone - 如何使用PageControl在UIScrollView中添加UITableView

iPhone YouTube channel 应用程序

ios - MPMoviePlayerController播放失败时如何获取错误描述

ios - 关闭 subview 时如何设置计时器

ios - 如何从 iOS 中的 Google Developers Console 获取客户端密码?

iphone - iOS 7升级后,UISearchbar中的UItextField失败

ios - 为什么我可以直接在我的设备上安装应用程序商店分发版本?

iphone - UIWebView 电影播放器​​被解雇的 iOS 6 错误

ios - 是否可以在 iphone 上的多个应用程序之间共享守护进程?

ios - 从 iOS 相机拍摄照片