【发布时间】:2013-11-12 17:21:29
【问题描述】:
我正在将 JaSidePanels 用于应用程序。我想在UITabBarController 的一个标签中打开一个Sidepanel,然后像facebook 一样隐藏tabBar,但只能在三个标签之一中。
在我的应用程序中登录后。 TabBarController 出现三个选项卡。在这三个选项卡之一中,我想显示一个侧面板来执行过滤请求,如果我将 JaSidePanelController 添加到 tabController 我可以这样做,但我不能隐藏选项卡栏。另一种选择是将所有ViewController 存储在NavigationController 中,并将此导航存储在JaSidePanelController.centerPanel = navigationController; 中,然后在每个选项卡中我可以打开侧面板并看到打开侧面板按钮。我试图隐藏按钮,但我没有。有什么想法吗?
这是我的代码,我使用的是第二个选项:
UITabBarController *tabBarController = [[UITabBarController alloc] init];
WPPlansViewController *plansVC = [[WPPlansViewController alloc] init];
plansVC.title = @"Mis planes";
WPStoreListViewController *sherpaVC = [[WPStoreListViewController alloc] init];
sherpaVC.title = @"Be Sherpa";
WPProfileViewController *profileVC = [[WPProfileViewController alloc] init];
profileVC.title = @"Perfil";
[tabBarController setViewControllers:@[plansVC,sherpaVC,profileVC]];
[tabBarController setSelectedIndex:1];
JASidePanelController *jaSidePanelVC = [[JASidePanelController alloc] init];
jaSidePanelVC.shouldDelegateAutorotateToVisiblePanel = NO;
jaSidePanelVC.leftPanel = [[WPFilterSidePanelViewController alloc] init];
UINavigationController *nav4 = [[UINavigationController alloc] initWithRootViewController:tabBarController];
nav4.navigationBar.topItem.title = nil;
jaSidePanelVC.centerPanel = nav4;
jaSidePanelVC.rightPanel = nil;
[self presentViewController:jaSidePanelVC animated:NO completion:nil];
【问题讨论】:
标签: ios iphone objective-c uitabbarcontroller jasidepanels