In the following example if only the long press will be performed, there is (apparently) no (built-in) way to find out that the drag gesture had failed (if I just lift my finger off the screen for example)
Is there a way to detect wether the second gesture had failed or hasn't been started?
.gesture(
LongPressGesture()
.onEnded { _ in
// First gesture completed ...
}
.sequenced(
before:
DragGesture()
.onEnded { gesture in
// Second gesture ended (not called if it has failed) ...
}
)
.onEnded { _ in
// Only called if both gestures succeed...
}
)