---
title: "onLongTouchGesture(minimumDuration:perform:onTouchingChanged:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/onlongtouchgesture(minimumduration:perform:ontouchingchanged:)"
---

# onLongTouchGesture(minimumDuration:perform:onTouchingChanged:)

Adds an action to perform when this view recognizes a remote long touch gesture. A long touch gesture is when the finger is on the remote touch surface without actually pressing.

## Declaration

```swift
nonisolated func onLongTouchGesture(minimumDuration: Double = 0.5, perform action: @escaping () -> Void, onTouchingChanged: ((Bool) -> Void)? = nil) -> some View

```

## Parameters

- `minimumDuration`: The minimum duration of the long touch that must elapse before the gesture succeeds.
- `action`: The action to perform when a long touch is recognized
- `onTouchingChanged`: A closure to run when the touching state of the gesture changes, passing the current state as a parameter.

## See Also

### Recognizing long-press gestures

- [onLongPressGesture(minimumDuration:maximumDistance:perform:onPressingChanged:)](swiftui/view/onlongpressgesture(minimumduration:maximumdistance:perform:onpressingchanged:).md)
- [onLongPressGesture(minimumDuration:maximumDistance:inputKinds:perform:onPressingChanged:)](swiftui/view/onlongpressgesture(minimumduration:maximumdistance:inputkinds:perform:onpressingchanged:).md)
- [onLongPressGesture(minimumDuration:perform:onPressingChanged:)](swiftui/view/onlongpressgesture(minimumduration:perform:onpressingchanged:).md)
- [LongPressGesture](swiftui/longpressgesture.md)
