We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
push到子控制器的时候隐藏底部tabbar。
此方法原本属于UIViewController,写在要push的viewController里。
UIViewController
viewController
如果一个导航控制器想要让所有push的子控制器都隐藏tabbar。
一般的做法是继承,在一个父类- (void)viewDidLoad中加上这么一行代码:
- (void)viewDidLoad
[self hidesBottomBarWhenPushed]; // available(0.0.6)
现在你有了另一种选择,“设置”这个导航控制器,让它push的子控制器都隐藏tabbar。
在导航控制器的- (void)viewDidLoad中加上这么一行代码:
[self ax_hidesBottomBarWhenPushed:YES]; // available(0.0.6)
作者注: 实现这个功能主要技术点是如何取消交换方法。 单纯地取消就是再交换一次,但是实际应用必须判断是否交换过,只有交换过才能再交换一次负负得正,否则会产生错乱。 为了判断是否交换过,我查阅了很多资料,也在很多技术群里询问,没有得到一个优雅的解决方案。只能采取比较笨的方法:就是在交换的时候做一个标记,通过标记值判断该方法指针是否指向原地址。
作者注:
实现这个功能主要技术点是如何取消交换方法。
单纯地取消就是再交换一次,但是实际应用必须判断是否交换过,只有交换过才能再交换一次负负得正,否则会产生错乱。
为了判断是否交换过,我查阅了很多资料,也在很多技术群里询问,没有得到一个优雅的解决方案。只能采取比较笨的方法:就是在交换的时候做一个标记,通过标记值判断该方法指针是否指向原地址。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hidesBottomBarWhenPushed
push到子控制器的时候隐藏底部tabbar。
此方法原本属于
UIViewController
,写在要push的viewController
里。如果一个导航控制器想要让所有push的子控制器都隐藏tabbar。
一般的做法是继承,在一个父类
- (void)viewDidLoad
中加上这么一行代码:现在你有了另一种选择,“设置”这个导航控制器,让它push的子控制器都隐藏tabbar。
在导航控制器的
- (void)viewDidLoad
中加上这么一行代码:The text was updated successfully, but these errors were encountered: