移除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];
}
移除tabBar 重影的更多相关文章
- iOS11自定义tabBar重影问题
转载自:(主链接)https://www.jianshu.com/p/1be90349fdb4 https://www.cnblogs.com/coderYu/p/5859638.html 很实用,有 ...
- iOS系统tabbar图标出现重影问题
大家在自定义tabbar的时候会将系统的tabbar干掉,然后放上自已自定义的tabbar(含有想要的Button)对不对,具体代码如下: /** * 添加自定义的tabBar */ -(void)a ...
- iOS开发之——巧用反射机制
1.应用场景——自定义UITabBarController的TabBar视图 (1)隐藏TabBar视图 一般我们选择自定义TabBar视图有两种方式.1是将tabBar视图隐藏;2是将TabBar视 ...
- 小程序API
基础: wx.canIUse(string) boolean wx.canIUse(string schema) 判断小程序的API,回调,参数,组件等是否在当前版本可用. 参数说明 ${A ...
- 微信小程序 API 界面(1)
界面 有关屏幕的api 交互: wx.showToast() 显示消息提示框 参数:object object的属性: title:类型 字符串 提示的内容(文本最多7个汉字) icon:类型 字符串 ...
- 自定义tabBar
★★★★自定义tabBar★★★★★★★ Demo下载地址:https://github.com/marlonxlj/tabBarCustom.git 前言: 有的时候需求要对tabBar进行自定义的 ...
- iOS 切换首页-更改tabbar的容器控制器
最近想到的一个小需求: 首页切换:点击一个切换按钮,能实现首页的风格.排版等变换,原理是用一个新的VC替换掉. 效果如下: ====>====> 实现方式很简单: 以我的Demo为例, ...
- iOS tabbar 自定义小红点 消息显示,定制边框、颜色、高宽
一般我们需要显示消息数,会利用到系统提供的api UIApplication.sharedApplication().applicationIconBadgeNumber = 10 但如果我们不想显示 ...
- 完全自定义 TabBar
// // CustomTabBarController.h // Dream // // Created by mac on 14-10-17. // Copyright (c) 2014年 HM. ...
随机推荐
- DIV + CSS问题收集
div里面有三列数据,怎么让他竖向排列,在css中怎么设置 https://zhidao.baidu.com/question/712007772597664245.html css设置块元素在div ...
- 【LA4670-Dominating Patterns】AC自动机
http://acm.hust.edu.cn/vjudge/problem/19224 题意:给定n个单词,一个字符串,问哪些单词在字符串中出现的次数最多.单词aba,文本ababa,则aba出现了2 ...
- bzoj 1433 二分图匹配
裸地匈牙利或者最大流,直接匹配就行了 需要注意的是(我就没注意细节WA了好多次...) 每个人和自己之间的边是0,但是应该是1 不是在校生是没有床的.... /******************** ...
- 基于SSM框架web搜索功能的实现
这里适合选用于jsp搭建的网站,数据库采用MySQL 一.HTML <div class="header_search"> <input type="t ...
- 内置函数补充,__str__方法、__del__方法 和 __call__方法和元祖
一 .内置函数补充 1.isinstance函数: isinstance(obj,cls)检查obj是否是类 cls 的对象 使用该函数来判断一个函数的类型 2. issubclass(sub, su ...
- Python学习笔记 - day7 - 类
类 面向对象最重要的概念就是类(Class)和实例(Instance),比如球类,而实例是根据类创建出来的一个个具体的“对象”,每个对象都拥有相同的方法,但各自的数据可能不同.在Python中,定义类 ...
- 根据流程实例ID获取当前任务
JAVA: Task task = this.processEngine.getTaskService().createTaskQuery().processInstanceId(“132501”). ...
- processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(“ 132501”).active().singleResult();
JAVA: processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(“ 132501”).ac ...
- 【LeetCode】Reverse digits of an integer
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you ...
- 关于存储权限WRITE_EXTERNAL_STORAGE和READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE:写入权限 READ_EXTERNAL_STORAGE:读取权限 最近申请存储权限时,在纠结是否需要同时申明WRITE_EXTERNAL_STORAGE 和 ...