This happens to me when I use side bar menu on iPad. When I tap on an active side bar item second time the app crashes.
I fixed the crash by checking if the view controller is already on screen like this:
if splitViewController.viewController(for: .secondary) != selectedViewController {
splitViewController.setViewController(nil, for: .secondary)
splitViewController.setViewController(selectedViewController, for: .secondary)
}
I hope this information might help someone to fix the issue in similar situation.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: