edudnyk / SheeKit

Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of `UISheetPresentationController` and other UIKit features.
MIT License
91 stars 7 forks source link

Enhance Presenter Proxy #13

Closed couchdeveloper closed 2 years ago

couchdeveloper commented 2 years ago

Before this change, a "SheetHost" view controller might not be presented if the presenter already presented another view controller. This might have happened when a sheet will be presented due to a state change originating from an app state, rather from a user intent, and when there is already a presented view or a presented alert.

This change walks the presented view controller list until it finds a view controller which has no presented view controller and uses this as the presenter. As a result, a sheet now presents on top of any other presented view, even on top of alerts.