在表格视图单元格上隐藏标签栏,单击 [英] hiding tabbar on table view cell click
本文介绍了在表格视图单元格上隐藏标签栏,单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在隐藏tabbar时遇到问题.这是我的代码
I have problem with hiding tabbar . this my code
//this created in the Delegate.m file
-(void)HideTabBar
{
mTabController.hidesBottomBarWhenPushed =YES;
}
//Now i want to this on the cell select Tab bar must hide when it go to the map view (other view ) for that i use this but its working
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
JourneyAppDelegate * journey = (JourneyAppDelegate *)[[UIApplication sharedApplication]delegate];
[journey HideTabBar];
}
But
它如何工作
推荐答案
在您将它推送为示例之前,mTabController不会变得不可见/隐藏:
mTabController will not get invisible/hidden until you push it for Example:
//this created in the Delegate.m file
-(void)HideTabBar
{
mTabController.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:IncomingViewController animated:YES];
}
//Now i want to this on the cell select Tab bar must hide when it go to the map view (other view ) for that i use this but its working
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
JourneyAppDelegate * journey = (JourneyAppDelegate *)[[UIApplication sharedApplication]delegate];
[journey HideTabBar];
}
在调用 pushViewController 之前,您需要为要推送的UIViewController设置 hidesBottomBarWhenPushed 属性.
You need to set hidesBottomBarWhenPushed property to the UIViewController that is going to be pushed before you call pushViewController.
这篇关于在表格视图单元格上隐藏标签栏,单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文