Post

Replies

Boosts

Views

Activity

Reply to SwiftUI on macOS: double tap on list item
.gesture(                                 TapGesture(count:1)                                     .onEnded({                                         print("Tap Displayed (Store: \(index)"))                                     })) //.gesture                             .highPriorityGesture(TapGesture(count:2)                             .onEnded({                                 print("Double Tap Displayed (Store: \(index))"                })) //.gesture Make the single tap the main gesture then add the double tap as highPriorityGesture this gains you exclusivity of the two gestures but "hesitates" slightly on single tap as OS waits to be sure it isn't double tap (index is my ForEach index)
Nov ’20