Skip to content

Latest commit

 

History

History

App2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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.