Presenting a ModalViewController containing a TabBarController
I have a problem with presenting and dismissing a modalViewController that contains a tabBarView controller (with two viewControllers).
I have no problem in presenting and dismissing the modal, but I have a navbar setup at the top of each view controller with a done button that will dismiss the modal and return the user back to the main view. The problem is that when the user taps the button to bring up the modal, it brings up the viewController that released the modal. I would prefer it to bring up the开发者_开发技巧 first viewController (the one furthest left on the tabBar).
I know it's really vague, but any ideas?
Try putting tabBarController.selectedIndex = 0;
in there somewhere before the modal controller is presented.
精彩评论