i am using the following code to present a modal View but still my navigation bar is hiding behind the status bar.
I can only see half of my Navigation bar ..
Plz point out my error and Suggest me the solution to it.
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];
here firstNav, secondNav,thirdNav, fourthNav and fifthNav are the instatnces of UINavigationController.
TabBarControllers are not meant to live inside navigation controllers, but each tab of a TabBarController can be a NavigationController. I’ve never tried to display a TabBarController modally but I suppose it should work. Switch the nesting of the TabBarController/NavigationController and it should work.