-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delayed presentation of UISplitViewController's content breaks on iPhone with the iOS 13 beta sdk #40
Comments
Dirty fix for the time being: Add |
Just to make sure that I understood it correctly. // 1
bag += split.present(viewController, options: [ .defaults, .showInMaster ]) and // 2
let nc = customNavigationController([ .defaults, .showInMaster ])
nc.viewControllers = [viewController]
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {
split.viewControllers = [nc]
} does not work as expected. But // 3
let nc = customNavigationController([ .defaults, .showInMaster ])
nc.viewControllers = [viewController]
split.viewControllers = [nc] has the correct expected behavior? |
Yes, exactly. See this: https://gist.github.com/nataliq/deef2efbd9ddab5e2b3bbf53dff9c0c0 |
I reported the issue through feedback assistant. Doesn't seem to be addressed in the latest betas too. |
Temporary fix implemented in 1.7.0 (#43) |
Since it was discovered that this also affects shouldPresentImmediately = root is UISplitViewController || vc is UISplitViewController || (root as? UINavigationController)?.viewControllers.isEmpty == true |
Expected Behavior
Running the Messages example app on iPhone running iOS 13 should show the list of messages.
Current Behavior
An empty grey screen is shown.
Steps to Reproduce
Context
In the main
present
method ofUIViewController
we delay the presentation if the view controller is not loaded yet. It seems like setting theviewControllers
of aUISplitViewController
or aUINavigationController
after it was presented in automatic mode on iPhone (showing only one of the screens), doesn't add the view controllers to the screen even though they are assigned to the property. This can be reproduced by replacing this line of code of the example app:with
Removing the
asyncAfter
call results in a correct behaviour.Failure Logs
No logs.
The text was updated successfully, but these errors were encountered: