zoukankan      html  css  js  c++  java
  • 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";
    
    }
    
    












  • 相关阅读:
    using 关键字在 C++ 中的几种用法
    Chromium 修改图片资源
    SAM&广义SAM
    Burnside和Polya
    笔记:杜教筛
    笔记:莫比乌斯反演
    Miller-Rabin
    点分治
    虚树
    计算几何
  • 原文地址:https://www.cnblogs.com/xukunhenwuliao/p/3576256.html
Copyright © 2011-2022 走看看