Contents

ignore(_:for:)

Tells the gesture recognizer to ignore a specific press of the given event.

Declaration

func ignore(_ button: UIPress, for event: UIPressesEvent)
@MainActor func ignore(_ button: UIPress, for event: UIPressesEvent)

Parameters

  • button:

    A Uibutton object that is part of the current button press event and associated with event.

  • event:

    A Uievent object that includes a reference to touch.

Discussion

If a button press isn’t part of this gesture you may pass it to this method, causing it to be ignored. UIGestureRecognizer does not cancel ignored presses on the associated view even if cancelsTouchesInView is true. This method is intended to be called, not overridden.

See Also

Implementing subclasses