Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 1.07 KB

README.md

File metadata and controls

14 lines (8 loc) · 1.07 KB

SwiftUI Navigation Problem

This UIKit application demonstrates that a SwiftUI view which is presented modally within a UIHostingController cannot be dismissed programmatically on iOS 14 and older devices.

This problem is particularly severe in landspace orientation because the modal takes up the full screen and cannot be dismissed by swiping down, as demonstrated below:

Demo of application

The issue was resolved in iOS 15. If you need present a SwiftUI view within a UIHostingController, you're best setting your target's IPHONEOS_DEPLOYMENT_TARGET Build Setting to 15.0 or higher.

Links

  1. See here for an OpenRadar copy of the bug report which I submitted to Apple's Feedback Assistant about this problem.
  2. See here for a discussion in StackOverflow about this problem.