• 移除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];

    }

  • 相关阅读:
    11.11 ntsysv:管理开机服务
    11.13 ethtool:查询网卡参数
    11.14 mii-tool:管理网络接口的状态
    11.15 dmidecode:查询系统硬件信息
    11.16-18 lsci、ipcs、ipcrm:清除ipc相关信息
    Devops 导论
    * SPOJ PGCD Primes in GCD Table (需要自己推线性筛函数,好题)
    SPOJ
    HDU 1695 莫比乌斯反演
    HDU 1800 hash 找出现最多次数的字符串的次数
  • 原文地址:https://www.cnblogs.com/wq-gril/p/7211876.html
Copyright © 2020-2023  润新知