presentModalViewController and still view UITabbarcontroller
I have a UIViewController (aViewController) added to a UI开发者_如何转开发NavigationController which in turn is added to a UITabBarController.
I then use [self.navigationController presentModalViewController:animated] within aViewController to present a new view controller (bViewController).
However bViewController is always displayed full screen, thus hiding the UITabBarController.
What can I do to ensure the UITabBarController is always visible when bViewController is presented modally?
The whole idea of a modal view controller is to prevent any further interaction until the modal view is dismissed. It may be that you want interaction with the tab bar controller, which means you don't want to use the modal view. Or, to comply with best practice, use modal view as it was intended.
You could probably set the frame of the modal view to only be as high as the view undernearth minus the height of the UITabBarController.
精彩评论