Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had a similar issue, but I found this <a href="https://stackoverflow.com/questions/3377001/popovers-cannot-be-presented-from-a-view-which-does-not-have-a-window">post</a> that demonstrated the idea that you have to remove the leftBarButtonItem from the previous detailView before setting up the splitView's view controllers. This code fixed the issue for me.</p> <p>This is the code from that written by TPoschel.</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Retrieve the new detail view controller UIViewController *detailViewController = [[self.allData objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; // Add the detail view controller to a navigation controller and set the bar style UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController]; detailNavigationController.navigationBar.barStyle = [[NSUserDefaults standardUserDefaults] integerForKey:@"UIBarStyle"]; // Retrieve previous detail view controller and remove the leftBarButtonItem UINavigationController *previousDetailNavigationController = [splitViewController.viewControllers objectAtIndex:1]; UIViewController *previousDetailViewController = [[previousDetailNavigationController viewControllers] lastObject]; previousDetailViewController.navigationItem.leftBarButtonItem = nil; // Update the split view controller's view controllers array. NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailNavigationController, nil]; splitViewController.viewControllers = viewControllers; [detailNavigationController release]; [viewControllers release]; // Dismiss the popover if it's present. if (popoverController != nil) { [popoverController dismissPopoverAnimated:YES]; } // This sets the left bar to nil when in landscape and equal to "Menu" when in portrait. // We need to remove rootPopoverButtonItem from the previous viewController... detailViewController.navigationItem.leftBarButtonItem = rootPopoverButtonItem; </code></pre> <p>} </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload