Input cancellation - iOS

On iOS, you should avoid using touchesBegan or UIControlEventTouchDown because users will not be able to cancel their interaction. Actions should only be activated through up events. Use a UITapGestureRecognizer instead, because it has built-in support for cancellation.

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
    // Use UITapGestureRecognizer instead
}