|
Lately I'm getting following crash while opening a context menu in LazyHStack item inside of LazyVStack: "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIPreviewTarget requires that the container view is in a window, but it is not. (container: <SwiftUI.HostingScrollView: 0x106876400>)'". Anyone can help me out how to avoid this crash issue ? |
|
Thanks for your answer. Yes, you're right the view is quite complex, I have horizontally scrollable items (LazyHGrid) inside of LazyVStack, something similar to Spotify app. The UI part of the old app was implemented using UIKit and we decided to rewrite it using SwiftUI, unfortunately I cannot post the code. The crash happens randomly while running the app on iPhone (iOS 14.x): I'm opening a context menu for one of the item, there's a preview of that item and the conext menu appears, here's the callstack from Xcode:
|
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.