How to make Modal view over Tab Bar instead of under?

I have a tab bar to select one of four different screens. For one of the views, let's call it "view A" I also have a modal view that slides up. This all worked fine and the modal view slid up over the tab bar which is what I want. I wanted to add a flipside view to "view A". In order to do this I made a rootviewcontroller to control "view a" and the flipside and toggle between them. Well this broke the modal view. So I then moved the modal view code that was in "view a"'s controller code to the root view controller code that I added to have the flipside animation. This is almost working, but the problem is now the modal view slides under the tab Bar instead of over it. How do I control this? The other problem is that when I dismiss the modal view, the button that allows the modal view to be presented in "view a" disappears. So I assume the button is getting pushed to the back. Here is my code for presenting the modal view controller over "view a". I think I may have some extra stuff in here I don't need.



- (IBAction)activatetradeinview:(id)sender {
//change view
LeaseViewController *timodal= [[til alloc] initWithNibName:@"tilxib" bundle:nil];
UINavigationController *secondNavigationController = [[UINavigationController alloc] initWithRootViewController:timodal];
LVController *viewController = [[LVController alloc] initWithNibName:@"LView" bundle:nil];
self.lViewController = viewController;
[viewController release];

[self.view insertSubview:lViewController.view aboveSubview:infoButton];
[lViewController presentModalViewController:secondNavigationController animated:YES];
[timodal release];
[secondNavigationController release];
}


Message was edited by: Marcus Ray

Posted on Oct 15, 2008 8:48 AM

Reply
5 replies

Oct 15, 2008 3:25 PM in response to SexyAndOhSoWitty

hmmmm....I'll mess with it more tonight. I guess my confusion is where to put the button to activate the modal view. If I put it in the delegate window than it will be sitting on top of all the tab views regardless of what tab you are on. I have a different modal view for a couple of the tabs. I'll see if I can figure this part out "You can access your AppDelegate from within rootViewController, and call a display method or something similar"

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to make Modal view over Tab Bar instead of under?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.