.gesture(LongPressGesture(minimumDuration: 0, maximumDistance: 10.0) .onChanged(){})
.gesture(LongPressGesture(minimumDuration: 0, maximumDistance: 10.0) .onChanged(){})
Hi here is example for change duration of gesture according to your need :
Rectangle()
.fill(isPressing ? Color.orange : .gray)
.frame(width: 50, height: 30)
.onLongPressGesture(minimumDuration: 0.25, maximumDistance: 50, pressing: { (isPressing) in
if isPressing {
// called on touch down
} else {
// called on touch up
message = "TAP"
}
}, perform: {
message = "LONG\nPRESS"
})