UITableBarcontrller中的moreNavigationController属性

我们在实际的开发中经常用到如下的情况.

修改More页面的Navigation背景及Edit Button

    [self.tabBarVC.moreNavigationController.navigationBarsetBackgroundImage:[UIImageimageNamed:@"NavBack.png"] forBarMetrics:UIBarMetricsDefault];

//    self.tabBarVC.moreNavigationController.topViewController.navigationItem.rightBarButtonItem = nil;

    self.tabBarVC.moreNavigationController.navigationBar.tintColor = [UIColorclearColor];

修改Configure页面的navigation背景及Done Button

1、头文件中添加<UITabBarControllerDeleaget>代理

2、viewDidLoad中添加

self.tabBar.delegate = self;

3、TabBarController代理的实现:

#pragma mark - UITabBarController delegate

- (void)tabBarController:(UITabBarController *)controller willBeginCustomizingViewControllers:(NSArray *)viewControllers {

    UIView *editView = [controller.view.subviews objectAtIndex:1];

    UINavigationBar *modalNavBar = [editView.subviewsobjectAtIndex:0];

    [modalNavBar setBackgroundImage:[UIImageimageNamed:@"NavBack.png"] forBarMetrics:UIBarMetricsDefault];

    modalNavBar.tintColor = [UIColorclearColor];

    //    editView.backgroundColor = [UIColor grayColor];

    //    modalNavBar.topItem.title = @"Edit Tabs";

}













posted @ 2014-01-02 15:14  徐坤很无聊  阅读(481)  评论(0编辑  收藏  举报