This is the situation:
I have a tab bar with 2 tabs. Tab01 and Tab02. In Tab01 I have a button which pushes repVC:
repVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:repVC animated:YES]; [(UIViewController *)[tabController.viewControllers objectAtIndex:0] setView:repVC.view]; [repVC release];
Inside repVC I have another button which pushes an MFMailComposerViewController:
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init]; [self presentModalViewController:mail animated:YES]; [mail release];
The problem is: when mailView is shown(in Tab01) and I click Tab02, then back to Tab01, the mailView is hidden and even if I click the email button again, the view won't be presented.
So what I have is:
Tab01.view -> repVC.view -> mail.view
For repVC
, I use this line when I push the view so that even if I go switch tabs, that view will still be activated:
[(UIViewController *)[tabController.viewControllers objectAtIndex:0] setView:repVC.view];
But I can't do the same for mail because tabController
is declared in another class which I cannot import. So I can't access the tabController and set the view for Tab01.
Hope the edit helped the understanding.