UISplitViewController: Skipping delegate calllback

Hi!

On iOS 14 a UISplitViewController inside my app has stopped calling some of its delegate methods.

For example on iOS 13 the delegate method collapseSecondaryOntoPrimaryViewController is correctly called when needed.

On iOS 14 this method is not called and this message is printed on the output:
[UISplitViewController] Skipping delegate calllback, splitViewController:collapseSecondaryViewController:ontoPrimaryViewController:. Unsupported for UISplitViewController style DoubleColumn

Can someone help me?

I'm using Xcode 12 beta 3 (12A8169g).

Thank you

Alan
Same exact issue.
It seems the problem is that when you add a UISplitViewController inside a storyboard in Xcode 12 beta 3 the controller is instantiated with the new "Two Columns" style instead of the classic old style.

Unfortunately at the moment there seems to be no way to set the style to classic directly from the storyboard.
A temporary fix is to manually instantiate the UISplitViewController without using the new init(style:) initialiser. If you use the old init() initialiser the style of the controller will be "unspecified" and it will behave in the classic way.

If your split view controller is the root controller of your storyboard you can set it to classic mode in this way:

Code Block
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
if #available(iOS 14.0, *) {
if let oldSVC = self.window?.rootViewController as? UISplitViewController {
/* If you instantiate an UISplitViewController in this way the style will be undefined (classic). */
let newSVC = UISplitViewController()
newSVC.viewControllers = oldSVC.viewControllers
/* Here you can align other properties if needed. */
self.window?.rootViewController = newSVC
}
}
...
}


Hope this helps.

Let's hope that in one of the next Xcode 12 betas it will be possible to set the split view controllers style to "unspecified" (classic mode) directly from the storyboard.
The solution is to use the new delegate method: topColumnForCollapsingToProposedTopColumn and return .primary or .secondary as needed.
I think that if you need to keep support for older versions of iOS it makes more sense to continue use the classic behaviour.
Happy to see that Apple has reported this as a known issue and therefore I expect that it will be solved in one of the next beta.

From Xcode 12 beta 4 release notes:
"Interface Builder doesn’t allow creating a classic style UISplitViewController. (65966010) (FB8107534)"
UISplitViewController: Skipping delegate calllback
 
 
Q