UITabbarController with MoreNavigationController , PoptoRootViewController issue

跟風遠走 提交于 2019-12-05 13:35:37

You can do this by in the ViewWillDisappear method of view controller in More tab, call method to pop this view out of MoreViewNavigationController, like this:

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController popViewControllerAnimated:NO];
}
Siby

May be too late but here it is for future reference

UITabController has a tabBar property and it has a delegate which tells you when a tabitem is tapped

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item 

Tab bar also has another property "items" which lists the visibile tabs. Find the index of the selected tab item in items in the delegate method implementation and if the index is 4 which is more button then call tab [controller.moreNavigationController popToRootViewController]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!