IPad Replaces Segue - Could not find ancestor controller split view

I connected a bunch of navigation controllers to my UISplitViewController to replace the detailed view, however, when I do this, I get this error

'Could not find a split view controller ancestor for '<UISplitViewController: 0x6a52f50>', while performing a split view controller replace segue (identifier 'Queue') with destination '<UINavigationController: 0x6870ff0>'' 

And I usually can guess what comes from these internal inconsistencies, but I don't mean that - any help is greatly appreciated!

Thanks!

+4
source share
2 answers

Examine the sequence of segues leading to the source scene. If there is no split view controller in the mix, you have found your problem. Replace segues can only be used in scenes that are presented in the context of a controller with a split view.

+4
source

I ran into this problem and all my segues were fine, no code interfered. Turns out the problem was in the main view controller:

 @property (strong, nonatomic) UISplitViewController *splitViewController; 

The property became unused and something tried to use it while it was nil . Just remove it did the trick.

+1
source

Source: https://habr.com/ru/post/1393987/


All Articles