导航栏没有完全显示在我的模态查看
问题描述:
我使用下面的代码来呈现模态视图,但我的导航栏仍然隐藏在状态栏后面。导航栏没有完全显示在我的模态查看
我只能看到一半我的导航条的.. PLZ指出我的错误,并建议我解决它。
tabBarController = [[UITabBarController alloc]init ];
UINavigationController *cntrol = [[UINavigationController alloc] initWithRootViewController:tabBarController];
NSArray* controllers = [NSArray arrayWithObjects:firstNav,secondNav,thirdNav,fourthNav,fifthNav, nil];
tabBarController.viewControllers = controllers;
tabBarController.selectedIndex=type;
[self presentModalViewController:cntrol animated:NO];
这里firstNav,secondNav,thirdNav,fourthNav和fifthNav是的UINavigationController的instatnces。
答
TabBarControllers并不意味着活导航控制器内部,而是一个TabBarController的每个标签可以是一个NavigationController。我从来没有试过模态显示TabBarController但我想它应该工作。切换TabBarController/NavigationController的嵌套,它应该工作。
什么是自我在这里? – mbh 2012-02-13 14:28:33
@mbh自我又是这里的viewController .. – Shubham 2012-02-14 06:31:32