SwiftUI: List Scrolling and .onLongPressGesture

Another tid-bit from my SwiftUI learnings.

Today I wanted to add a long press guesture recogniser to a list item. I did so, and my list would no longer scroll. It seemed that .onLongPressGesture was hijacking the scrolling of the list.

The solution: add .onTapGesture to your list item before .onLongPressGesture and your list will scroll again.

Dave Nott @_davenott