I've tried dismiss, endEditing and isActive = false before turning the viewController in PageboyViewControllerDataSource, but it seems this doesn't happen soon enough for the crash to happen.
Steps to reproduce:
Add two viewControllers, one which uses a UISearchController
Open the page with the search controller, and select it so the keyboard presents
Try to switch pages without dismissing the search controller keyboard
Experience the following crash:
I have confirmed that manually dismissing the UISearchController via a different button, then switching pages, prevents the crash.
I've tried
dismiss
,endEditing
andisActive = false
before turning the viewController inPageboyViewControllerDataSource
, but it seems this doesn't happen soon enough for the crash to happen.Steps to reproduce: