Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

[SwiftUI] Gesture Conflict: simultaneousGesture Causes Incorrect Gesture Recognition in iOS 18

Subject: SwiftUI Gesture Conflict in iOS 18: Simultaneous Recognition of Drag and Tap Gestures

Description: In SwiftUI on iOS 18 and above, we've identified an issue with gesture handling that affects user experience. When implementing .simultaneousGesture(DragGesture()), the system incorrectly recognizes and processes both drag and tap gestures concurrently, resulting in unintended behavior.

Technical Details:

  • Environment: SwiftUI, iOS 18+
  • Issue: Simultaneous recognition of horizontal drag gestures and vertical scroll/tap gestures
  • Current Behavior: Both vertical and horizontal scrolling occur simultaneously when using .simultaneousGesture(DragGesture())
  • Expected Behavior: Gestures should be properly disambiguated to prevent concurrent scrolling in multiple directions

Impact: This behavior significantly impacts user experience, particularly in custom carousel implementations and other UI components that rely on precise gesture handling. The simultaneous recognition of both gestures creates a confusing and unpredictable interaction pattern.

Steps to Reproduce:

  1. Create a SwiftUI view with horizontal scrolling (e.g., custom carousel)
  2. Implement .simultaneousGesture(DragGesture())
  3. Add tap gesture recognition to child views
  4. Run on iOS 18
  5. Attempt to scroll horizontally

Observed Result: Both horizontal dragging and vertical scrolling/tapping are recognized and processed simultaneously, creating an inconsistent user experience.

Expected Result: The system should properly disambiguate between horizontal drag gestures and vertical scroll/tap gestures, allowing only one type of gesture to be recognized at a time based on the user's intent.

Please let me know if you need any additional information or reproduction steps.

[SwiftUI] Gesture Conflict: simultaneousGesture Causes Incorrect Gesture Recognition in iOS 18
 
 
Q