-(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. IE9,IE10 CSS因Mime类型不匹配而被忽略问题 (转)

    写页面的时候在chrome,fireforks等页面上显示正常,但是换成IE9,IE10之后就完全没有样式了,报错信息是CSS 因 Mime 类型不匹配而被忽略,下面与大家分享下这个问题的相关的回答 ...

  2. jsp小知识点(2)

    一:自定义的函数库:在wh.tld中 <description>JSTL 1.1 functions library</description> <display-nam ...

  3. 【LibreOJ】【LOJ】#6220. sum

    [题意]对于n个数,找出一些数使得它们的和能被n整除,输出任意一组方案,n<=10^6. [算法]构造/结论 [题解]引用自:http://www.cnblogs.com/Sakits/p/74 ...

  4. 【洛谷 P2515】 [HAOI2010]软件安装 (缩点+树形背包)

    题目链接 看到代价和价值这两个关键词,肯定是首先要想到背包的. 但是图中并没有说这是棵树,所以先要\(Tarjan\)缩点,然后就是选课了,跑一遍树形背包就好了. 注意:缩点后应该是一个森林,应该用一 ...

  5. libssh2

    http://www.cnblogs.com/lzrabbit/p/4298794.html shell脚本实现ssh自动登录远程服务器示例: #!/usr/bin/expect spawn ssh ...

  6. jquery 的combobox 处理级联

    随笔---jquery 的combobox 处理级联 ------------------------html------------- <select id="groupId&quo ...

  7. Django组件之contenttype的应用

    contenttypes 是Django内置的一个应用,可以追踪项目中所有app和model的对应关系,并记录在ContentType表中. 每当我们创建了新的model并执行数据库迁移后,Conte ...

  8. Redis的cluster集群

    目前Redis实现集群的方法主要是采用一致性哈稀分片(Shard),将不同的key分配到不同的redis server上,达到横向扩展的目的. 对于一致性哈稀分片的算法,Jedis-2.0.0已经提供 ...

  9. 利其器之webstorm快捷键

    总结几个webstorm常用的快捷键(macbook下) 最实用: command + option + 左/右箭头           定位到历史记录中上次/下次编辑的位置 command + b ...

  10. Nginx 的安装配置入门(mac)

    1.安装Nginx服务器: 执行命令 brew install nginx 安装完以后,可以在终端输出的信息里看到一些配置路径: /usr/local/etc/nginx/nginx.conf (配置 ...