-(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];

}

移除tabBar 重影的更多相关文章

  1. iOS11自定义tabBar重影问题

    转载自:(主链接)https://www.jianshu.com/p/1be90349fdb4 https://www.cnblogs.com/coderYu/p/5859638.html 很实用,有 ...

  2. iOS系统tabbar图标出现重影问题

    大家在自定义tabbar的时候会将系统的tabbar干掉,然后放上自已自定义的tabbar(含有想要的Button)对不对,具体代码如下: /** * 添加自定义的tabBar */ -(void)a ...

  3. iOS开发之——巧用反射机制

    1.应用场景——自定义UITabBarController的TabBar视图 (1)隐藏TabBar视图 一般我们选择自定义TabBar视图有两种方式.1是将tabBar视图隐藏;2是将TabBar视 ...

  4. 小程序API

    基础: wx.canIUse(string)    boolean wx.canIUse(string schema)   判断小程序的API,回调,参数,组件等是否在当前版本可用. 参数说明 ${A ...

  5. 微信小程序 API 界面(1)

    界面 有关屏幕的api 交互: wx.showToast() 显示消息提示框 参数:object object的属性: title:类型 字符串 提示的内容(文本最多7个汉字) icon:类型 字符串 ...

  6. 自定义tabBar

    ★★★★自定义tabBar★★★★★★★ Demo下载地址:https://github.com/marlonxlj/tabBarCustom.git 前言: 有的时候需求要对tabBar进行自定义的 ...

  7. iOS 切换首页-更改tabbar的容器控制器

    最近想到的一个小需求: 首页切换:点击一个切换按钮,能实现首页的风格.排版等变换,原理是用一个新的VC替换掉. 效果如下:   ====>====> 实现方式很简单: 以我的Demo为例, ...

  8. iOS tabbar 自定义小红点 消息显示,定制边框、颜色、高宽

    一般我们需要显示消息数,会利用到系统提供的api UIApplication.sharedApplication().applicationIconBadgeNumber = 10 但如果我们不想显示 ...

  9. 完全自定义 TabBar

    // // CustomTabBarController.h // Dream // // Created by mac on 14-10-17. // Copyright (c) 2014年 HM. ...

随机推荐

  1. MyBatis对象关联关系----多对多的保存与查询

    模拟情景: 对象:学生,课程 关系:一个学生可选多个课程,一门课程可被多个学生选择 一.保存 1.创建数据库表,student,course,student_course,其中student_cour ...

  2. 基于MapReduce的手机流量统计分析

    1,代码 package mr; import java.io.IOException; import org.apache.commons.lang.StringUtils; import org. ...

  3. 9张图让你明白什么叫做"一坨屎"一样的iOS垃圾代码

    前言:这是一个两万余行的商业项目,但代码质量却不敢恭维!     //本文永久链接,转载请注明出处:http://www.cnblogs.com/ChenYilong/p/3489939.html  ...

  4. Django【进阶】

    FBV和CBV http://www.cnblogs.com/lucaq/p/7565560.html 中间件 http://www.cnblogs.com/lucaq/p/7581234.html ...

  5. 基于vlc sdk的二次开发--环境搭建、编译

    前言 关于 搭建.编译VLC,不同的平台有不同的方法,可以参考wiki. 其中在windows下编译VLC有两种方式,MSYS+MinGW和CygWin.通过测试,最后决定采用MSYS+MinGW搭建 ...

  6. Tarjan 联通图 Kuangbin 带你飞 联通图题目及部分联通图题目

    Tarjan算法就不说了 想学看这 https://www.byvoid.com/blog/scc-tarjan/ https://www.byvoid.com/blog/biconnect/ 下面是 ...

  7. Windows+Git+TortoiseGit+COPSSH安装图文教程【转】

    转自:http://blog.csdn.net/aaron_luchen/article/details/10498181/ Windows+Git+TortoiseGit+COPSSH 安装图文教程 ...

  8. mybatis generator 生成javabean自定义类型转换

    因为默认mybatis generator自动生成的,带小数的都转成了bigdecimal了,而且长度不同的整数转成了不同的类型. 但是我想要带小数的转成double,整数转成integer. 所有自 ...

  9. background-clip,origin属性

    background-clip是新增属性之一,其作用是确定背景的裁剪区域. background-clip语法: background-clip:margin-box | padding-box | ...

  10. 【C++】指针和new相关

    看黄邦勇帅的笔记. 指针和new之前觉得已经掌握的很好了,可是看了资料还是get到了新知识.记录一下. 1.指针只支持 4 种算术运算符:++,――,+,-.指针只能与整数加减.指针运算的原则是:每当 ...