Hello,
I'm working on a Swift/SwiftUI project, which is basically finished and everything was working well when I was doing it on macOS Monterey/Xcode 14.0.1, but since I upgraded to macOS Sonoma/Xcode 15.3, some issues have appeared from nowhere, without me doing any changes to the code in the meantime.
Among these issues, I made a Drag Gesture (swipe up) on a ZStack, to navigate from a view to another. As I just said, like the rest it was initially working but it doesn't work anymore since my last macOS update and I didn't change anything. Here is the code related to it:
.gesture(
DragGesture()
.onEnded { gesture in
if gesture.translation.height < -50 {
showGalleryView = true
}
}
)
I tried to find the origin of the problem by doing prints, and I had the confirmation that the gesture is detected and the value of showGalleryView (which is a @State/@Binding variable) is indeed changed to true. But it doesn't have any effect, it stays on the initial view. Here are the results when I include the prints in the code above:
I don't understand if there is a problem elsewhere in my code or if the problem is caused by something like a parameter in Xcode or the macOS update. Any ideas?
Thanks.