are there changes in horizontal size class for modal UIKit controllers and SwiftUI view on iPad?

Asked on 09/22/2024

1 search

Yes, there are changes related to the horizontal size class for modal UIKit controllers and SwiftUI views on iPad. In iOS 18, UIKit introduces automatic trait tracking, which simplifies handling changes in traits like the horizontal size class. This means that when the horizontal size class changes, UIKit automatically updates the layout without the need for manual registration and handling, as described in the session What’s new in UIKit.

For SwiftUI, presentation sizing is now unified and simplified across platforms, allowing for more control over the size of modal presentations. This is discussed in the session What’s new in SwiftUI.