I have a UISplitView with a masterView and a detailView. The masterView is a UITableViewController (inside a UINavigationControler) and the detailView is a UIViewController (also inside a UINavaigationController).
The UISplitView appears just fine with the masterView and an empty detailView. In masterView, I have this method:
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (![self splitViewController])
DetailViewController*myDetailView = [[DetailViewController alloc] init];
Item *selectedItem = [items objectAtIndex:[indexPath row]];
[myDetailView setItem:selectedItem];
[[self navigationController] pushViewController:myDetailView animated:YES];
}
This works fine for iPhone.
For iPad, the detailView appears in the masterViewController, allbeit correctly, but the detailview remains empty.
How can I make myDetailview appear in the detailView (right side of the splitView)?
I recommend you to use Matt gemmell’s
MGSplitViewControllerHe has customized everything in the split view controller, you can get the master at right side using this and its just weird that you said that
UISplitViewControlleris working fine in iPhoneTo be clear
UISplitViewControlleris specific for iPad and not for iPhoneSo, please have a knowledge of iPad specific controllers like
UIPopOverControllerandUISplitViewControllerIn Doc’s, you can read this in the first line it self