- (void)hideTabBar { if (self.tabBarController.tabBar.hidden == YES) { return; } UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) { contentView = [self.tabBarController.view.subviews objectAtIndex:1]; }else { contentView = [self.tabBarController.view.subviews objectAtIndex:0]; } contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); self.tabBarController.tabBar.hidden = YES; } - (void)showTabBar { if (self.tabBarController.tabBar.hidden == NO) { return; } UIView *contentView; if ([[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]]) { contentView = [self.tabBarController.view.subviews objectAtIndex:1]; }else { contentView = [self.tabBarController.view.subviews objectAtIndex:0]; } contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height - self.tabBarController.tabBar.frame.size.height); self.tabBarController.tabBar.hidden = NO; }
相关推荐
隐藏TabBar的一些方法小结 在项目中经常遇到隐藏tabBar,实力很多种方法,可以解决不同情况下问题
iphone开发,隐藏系统Tabbar ,自定义Tabbar,切换Tabbar时的滑片效果以及按钮跳跃动画,有码有真相,想要的撒分拿码。
自定义和系统的tabbar的区分,跳转页面对它的隐藏。
tabbar--上下滑动控件tabbar和导航栏隐藏
iphone开发中,导航和tabbar的结合使用,代码样例。
tabbar上显示小红点,拉入工程,通过[self.tabBarController.tabBar showBadgeOnItemIndex:1];显示小红点,通过[self.tabBarController.tabBar hideBadgeOnItemIndex:1];隐藏小红点
vue3项目中跳转页面隐藏TabBar的方法
iphone开发技巧UI篇之自定义TabBar iphone开发技巧UI篇之自定义TabBar iphone开发技巧UI篇之自定义TabBar
1、小程序底部的tabBar需要根据不同用户角色显示不同底部导航。 2、使用自定义底部导航custom-tab-bar优雅实现微信小程序动态tabBar。 3、实现自由组合tabBar菜单项目,支持自由组合总数超过5个tabBar菜单。 4、本...
微信小程序底部tab-bar组件,高度还原微信原生tabBar功能及样式,且兼容iPhone异形全面屏,主要用于解决微信官方tabBar在遮罩层下无法被遮住的问题
iOS上下拉隐藏与显示导航栏与tabBar
iphone 自定义tabbar, 自定义tabbar的背景
⊙ 修复iPhone X 适配问题 ⊙ 性能优化 ⊙ 支持自定义tabBar动画 ⊙ 支持自定义tabBar样式 ⊙ 支持自定义badgeValue动画 ⊙ 支持自定义badgeValue样式 ⊙ 完美支持横竖屏 ⊙ 支持CocoaPods 更多说明请移步...
uniapp小程序自定义动态tabbar
网上基本上都是OC版的,我这里写了个swift版的。
仿淘宝自定义的Tabbar,实现了在页面跳转的时候,tabBar的隐藏和显示
小程序tabbar素材小程序tabbar素材小程序tabbar素材小程序tabbar素材 微信小程序tabbar小图片
自定义tabbar,规定某个tabbar项目根据需要显示不同的tab页面。通过一个空白的中间页面进行中转。从而实现根据需求显示不同页面的功能
TabBarsAnimationDemo — 底部菜单push隐藏菜单栏动画(仿<京东> 及 <东方财富通> tabBar效果)
来源:Licence:MIT作者:只向前看 实现自定义tabBar,跳转隐藏自定义tabBar 的功能。