Update for iOS 9 beta: Apple may have fixed this for iOS 9. If you are working on this issue for iOS 8, make sure that it also works correctly on iOS 9.
In the storyboard, I created a segue presentation to present the navigation and view controller with a button, as well as create a spinning segment.
In portrait orientation, a modal (full-screen) view is unwound / rejected as expected.
In landscape orientation, a challenge is played, but the popover presentation does not automatically decline.
Did I miss something? Should I decline a popover presentation?
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)__unused sender { if ([[segue identifier] isEqualToString:@"showSelectBookChapter"]) { UINavigationController *navigationController = segue.destinationViewController; if ([navigationController.topViewController isKindOfClass:[BIBLESelectViewController class]]) { BIBLESelectViewController *selectViewController = (BIBLESelectViewController *)navigationController.topViewController; selectViewController.initialBookChapterVerse = self.bookChapterVerse; } } } - (IBAction)unwindToBIBLEChapterViewController:(UIStoryboardSegue *)segue { if ([segue.identifier isEqualToString:@"unwindToBIBLEChapterViewController"]) { if ([segue.sourceViewController isKindOfClass:[BIBLESelectViewController class]]) { BIBLESelectViewController *sourceViewController = (BIBLESelectViewController *)segue.sourceViewController; self.bookChapterVerse = sourceViewController.selectedBookChapterVerse; [self.tableView reloadData]; } } }
Update: After looking at the code for the gabbur example, I narrowed down the problem before the question of dismissal surfaced in the Single View application, but not in the Master Details application.
Update 2: This is what the hierarchy looks like (lowering the navigation controllers for simplicity), answering a question from Louis, he asked:
- Split image controller
- Master view controller
- Detail view controller
- Chapter view controller (modal page sheet)
- Select a view controller (a problematic popover that deploys to the chapter controller but doesn't miss it)
As I mentioned in the previous update, I created a new master / detail template and simply presented a popover directly from (on the button) the detailed view. This will not be rejected.
user4151918
source share