I've ran into some problems using UISplitViewController
with presentViewController:animated:completion
.
To break the problem down into its simplest form, I've created a simple project with the master/detail template. In the project I've added a +
button in the navigation bar of the master view. The plus button creates a navigation controller with a simple blank view. This navigation controller is then presented using presentViewController:animated:completion
. However, the presented view only displays in the master view and when you dismiss it, the master view takes up the whole screen. I can't seem to understand what is going on. Anyone else encountered this problem? Here's the code.
- (void)showViewController:(id)sender
{
LMTestViewController *masterView = [[LMTestViewController alloc] init];
[self presentViewController:masterView animated:YES completion:nil];
[masterView release];
}
Thanks for your help.