Instance Method インスタンスメソッド

onLongPressGesture(minimumDuration:perform:onPressingChanged:)

Adds an action to perform when this view recognizes a long press gesture. このビューが長押しジェスチャを認識する時に実行するアクションを加えます。

Declaration 宣言

func onLongPressGesture(minimumDuration: Double = 0.5, perform action: @escaping () -> Void, onPressingChanged: ((Bool) -> Void)? = nil) -> some View

Parameters パラメータ

minimumDuration

The minimum duration of the long press that must elapse before the gesture succeeds. ジェスチャが成功する前に経過しなければならない長押しの最小期間。

action

The action to perform when a long press is recognizes

onPressingChanged

A closure to run when the pressing state of the gesture changes, passing the current state as a parameter.