如何以编程方式隐藏UITabBarController? [英] How to hide UITabBarController programmatically?
本文介绍了如何以编程方式隐藏UITabBarController?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过动画将其隐藏?
Is it possible to hide it with animation ?
推荐答案
UITabBar继承自UIView,因此您可以像使用标准UIView一样对其进行隐藏和设置动画.
A UITabBar inherits from UIView, so you can hide it and animate it like you would with a standard UIView.
- (void) hideTheTabBarWithAnimation:(BOOL) withAnimation {
if (NO == withAnimation) {
[theTabBar setHidden:YES];
} else {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelegate:nil];
[UIView setAnimationDuration:0.75];
[theTabBar setAlpha:0.0];
[UIView commitAnimations];
}
}
这篇关于如何以编程方式隐藏UITabBarController?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文