internal void HandleTouchCancel(TouchState touch) { if (isRemoved || !IsTouchEnabled()) { return; } if (!HasTouch(touch.id)) { return; } if (HitTestPoint(touch.position)) { return; } _touches.RemoveAt(GetTouchIndex(touch.id)); _isPressed = _touches.Count > 0; TouchCanceled.Dispatch(this, touch); if (_touches.Count == 0) { Canceled.Dispatch(this); } }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); var touch = touches.AnyObject as UITouch; if (touch != null) { TouchCanceled?.Invoke(this, touch); } }