我正在制作iPad应用程序,在显示详细视图时遇到问题。
这是我的代码:
NSArray *controllers = self.splitViewController.viewControllers;
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController_iPad" bundle:nil];
[detailViewController setDetailItem:[arrayRevisiones objectAtIndex:indexPath.row]];
UINavigationController *masterNavigationController = [controllers objectAtIndex:0];
UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
NSArray *newControllers = [NSArray arrayWithObjects:masterNavigationController, detailNavigationController, nil];
self.splitViewController.delegate = detailViewController;
self.splitViewController.viewControllers = newControllers;
[vistaTabla deselectRowAtIndexPath:indexPath animated:YES];
我知道问题是我没有在任何地方添加按钮,但我不知道在哪里添加它。