Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Delayed presentation of UISplitViewController's content breaks on iPhone with the iOS 13 beta sdk #40

@nataliq

Description

@nataliq

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

  1. Build and run the Messages example app with Xcode 11 on an iPhone simulator.

Context

  • Operating Version: iOS 13 beta 1
  • Swift version: 5.1

In the main present method of UIViewController we delay the presentation if the view controller is not loaded yet. It seems like setting the viewControllers of a UISplitViewController or a UINavigationController 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:

bag += split.present(viewController, options: [ .defaults, .showInMaster ])

with

let nc = customNavigationController([ .defaults, .showInMaster ])
nc.viewControllers = [viewController]

DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {
    split.viewControllers = [nc]
}

Removing the asyncAfter call results in a correct behaviour.

Failure Logs

No logs.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions