【发布时间】:2014-10-27 18:33:12
【问题描述】:
我有这个非常标准的标签栏控制器设置:
UIViewController *homeViewController = [[PLOTHomeViewController alloc] init];
UIViewController *upcomingViewController = [[PLOTUpcomingViewController alloc] init];
UIViewController *checkInViewController = [[PLOTCheckInViewController alloc] init];
UIViewController *watchlistViewController = [[PLOTWatchlistViewController alloc] init];
UIViewController *profileViewController = [[PLOTProfileViewController alloc] init];
PLOTNavigationController *homeNavVC = [[PLOTNavigationController alloc] initWithRootViewController:homeViewController];
PLOTNavigationController *upcomingNavVC = [[PLOTNavigationController alloc] initWithRootViewController:upcomingViewController];
PLOTNavigationController *checkInNavVC = [[PLOTNavigationController alloc] initWithRootViewController:checkInViewController];
PLOTNavigationController *watchlistNavVC = [[PLOTNavigationController alloc] initWithRootViewController:watchlistViewController];
PLOTNavigationController *profileNavVC = [[PLOTNavigationController alloc] initWithRootViewController:profileViewController];
self.tabBarController = [[PLOTTabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:homeNavVC, upcomingNavVC, checkInNavVC, watchlistNavVC, profileNavVC, nil];
但是,我试图弄清楚,当用户选择中间选项卡 (checkInViewController) 时,我可以如何以模态方式(全屏)呈现该视图控制器?我可能会在那个 VC 的 viewDidAppear 方法中想象一些东西,但我不确定你是否可以模态地展示自己,如果你是 VC?最好的方法是什么?
【问题讨论】:
-
在 checkInView 的 init 方法中设置 self.hidesBottomBarWhenPushed 是否满足您的需要?
-
@neal 真是太棒了,我想它给了我最终的结果,但我想我不能像模态一样“忽略”它......或者我可以吗? (而且它没有动画)
标签: ios objective-c