In my application which is based on a tabbar view controller with many uinavigationviewcontrollers for each tabbar items, I want to present at some point (at application launch) with a call to presentModalViewController that contains a uinavigationcontroller as a root so the user can do a few things... when he or she is finished, the Done button at the top right corner can be tapped to dismiss the modal view controller and then return to the base tabbar view.... How can I do that with Interface Builder ?
In XCode, create a new View XIB file and open it in Interface Builder. In this xib file, delete the View and drag a UINavigationController into it's place.
Then, in your view controller code, something like
UINavigationController *controller = [[UINavigationController alloc] initWithNibName:@"ModalViewController" bundle:nil];
[self presentModalViewController:controller animated:YES];
[controller release];
Will load your XIB and present it.
Hope this helps, any other questions don't hesitate to comment on this answer!
S
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With