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

Support for embedded NavigationStack #16

Open genkernel opened 3 months ago

genkernel commented 3 months ago

Thanks for the SheeKit. I started using it due to memory related issues with native .sheet() implementation (https://stackoverflow.com/questions/77153299/swiftui-view-leaks-in-ios-17#comment136053128_77153299).

I noticed SheeKit does not play well with NavigationStack embedded inside of a presented view. I can confirm that .sheet() (iOS 17.5) does handle it correctly while SheeKit immediately hides view after the vivew was briefly presented.

App's architecture looks like this: NavigationStack: (ViewA ---(push)---> ViewB ----> ...) .....................................................................| .....................................................................| ................................................................sheet( NavigationStack: (ViewC ---(push)---> ViewD ----> ...) )