zoukankan      html  css  js  c++  java
  • 移除tabBar 重影

     

    -(void)viewWillLayoutSubviews{

        

        [super viewWillLayoutSubviews];

        

        for (UIView *child in self.tabBar.subviews) {

            

            if ([child isKindOfClass:NSClassFromString(@"UITabBarButton")]) {

                

                [child removeFromSuperview];

                

            }

            

        }

        

    }

     

    @interface BaseNavigationController ()

    //<UINavigationControllerDelegate>

     

    @end

     

    @implementation BaseNavigationController

     

    - (void)viewDidLoad {

        [super viewDidLoad];

        self.navigationBar.translucent = NO;

        self.automaticallyAdjustsScrollViewInsets = NO;

        self.navigationBar.barTintColor =  JRGBCOLOR(245, 246, 247);     //设置导航栏字体样式

        self.navigationBar.tintColor = JRGB(0xa4a4a4);

        [self.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17.0f],NSForegroundColorAttributeName:[UIColor blackColor]}];

    //    self.delegate = self;

    }

    - (void)pushViewController:(UIViewController *)viewController

                      animated:(BOOL)animated

    {

        if (self.viewControllers.count > 0) {

            viewController.hidesBottomBarWhenPushed = YES;

        }

        [super pushViewController:viewController animated:animated];

    }

    //- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated

    //{

    //    // 删除系统自带的tabBarButton

    //    for (UIView *tabBar in self.tabBarController.tabBar.subviews) {

    //        if ([tabBar isKindOfClass:NSClassFromString(@"UITabBarButton")]) {

    //            [tabBar removeFromSuperview];

    //        }

    //    }

    //}

    - (void)didReceiveMemoryWarning {

        [super didReceiveMemoryWarning];

    }

  • 相关阅读:
    Codeforces Round #631 (Div. 2)
    Codeforces Round #500 (Div. 2) [based on EJOI]
    KMP+状态机
    状态机模型
    最短编辑距离
    stringstream读入-最优乘车
    多重背包
    Codeforces:B. New Year and Ascent Sequence
    查找目录下所有文件使用到的宏
    QProcess调用外部程序并带参执行
  • 原文地址:https://www.cnblogs.com/wq-gril/p/7211876.html
Copyright © 2011-2022 走看看