I customized a UITabbarController
and give 5 NavigationController
to it, such as:
WXCustomerBar* bar = [[WXCustomerBar alloc]init];
[bar setViewControllers:[NSArray arrayWithObjects:
[[UINavigationController alloc]initWithRootViewController:[[IndexView alloc]init]], [[UINavigationController alloc]initWithRootViewController:[[SecondView alloc]init]]
In the indexView
the tabbar is shown, when I click a button to present another view settingView
I want to hide the tabbar. Then when I click the button in settingView, present into the SecondView, I want to display the tabbar.
This is my present method:
-(void)presentToNetViewController:(id)viewController
{
if (![viewController isKindOfClass:[WXCustomerBar class]]) {
UINavigationController* navi = [[UINavigationController alloc]initWithRootViewController:viewController];
[self presentViewController:navi animated:YES completion:nil];
}else
{
[self presentViewController:viewController animated:YES completion:nil];
}
}
I'm not English, sorry for my odd language.