Open andrei115 opened 3 years ago
@andrei115 have you found a solution to this problem? A temp solution for me has been to use the tag/selection version of NavigationLink and use a ZStack. But implementing this throughout the app is super cumbersome.
@seboslaw I'm not familiar with the tag/selection version of the NavigationLink. The solution for me was to conditionally use LazyGrid for ios14/15 and fallback to ASCollectionView for ios 13. We eventually plan on dropping support for ios 13 as it's really buggy and it does not work well with other libraries(like for example KingFisher for image caching, if you've used)
@andrei115 that sounds like the right decision. The tag/selection version is basically described here: https://stackoverflow.com/a/57837007 You create the NavigationLinks with EmptyViews and set a tag to each. You then assign a State var to capture the selection. And lastly you you a button in your view to set this State var to the tag value you want to navigate to.
in ios 15, NavigationLinks inside ASCollectionView are popped when a modal is displayed from the destination view.