public override void TouchesCancelled(NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); //Fix issue with unneccesart calls to the tap handlers NSObject.CancelPreviousPerformRequest(this, new Selector("DidSingleTap"), null); }
public override void WillMoveToSuperview(UIView newsuper) { base.WillMoveToSuperview(newsuper); if (newsuper == null) { NSObject.CancelPreviousPerformRequest(this, new Selector("assignTextDelegateForViewsBeneathView"), this); } }
public void _cancelContinousPressIfNeeded() { NSObject.CancelPreviousPerformRequest(this, /*selector*/ new Selector("_beginContinuousPress"), /*object*/ null); NSTimer timer = this.continuousPressTimer; if (timer != null) { timer.Invalidate(); this.continuousPressTimer = null; } }
partial void meme(NSObject sender) { memeEffect.Seek(CMTime.Zero); memeEffect.Play(); NSObject.CancelPreviousPerformRequest(this); PerformSelector(new ObjCRuntime.Selector("flash"), null, MEME_FLASH_DELAY); PerformSelector(new ObjCRuntime.Selector("startZoom:"), NSNumber.FromFloat(getZoomSliderValue()), MEME_ZOOM_DELAY); device.VideoZoomFactor = 1; foreach (var faceId in faceViews.Keys) { FaceView view = faceViews [faceId]; view.Alpha = 0; } }
/// <summary> /// Handle touches ended event /// </summary> /// <param name="touches">Touches.</param> /// <param name="evt">Evt.</param> private void CellWasTapped(NSSet touches, UIEvent evt) { UITouch touch = touches.AnyObject as UITouch; if (touch != null) { //make sure the touch was in this view if (true) { switch (touch.TapCount) { case 1: { if (GridView.EnableDoubleTap) { this.PerformSelector(new Selector("DidSingleTap"), null, DSGridView.DoubleTapTimeout); } else { DidSingleTap(); } } break; case 2: { if (GridView.EnableDoubleTap) { NSObject.CancelPreviousPerformRequest(this, new Selector("DidSingleTap"), null); this.PerformSelector(new Selector("DidDoubleTap"), null, 0.01f); } // } break; } } } }
/// <summary> /// Handles the touches. /// </summary> /// <param name="touches">Touches.</param> /// <param name="evt">Evt.</param> private void HandleTouches(NSSet touches, UIEvent evt) { UITouch touch = touches.AnyObject as UITouch; if (touch != null) { switch (touch.TapCount) { case 1: { this.PerformSelector(new MonoTouch.ObjCRuntime.Selector("DidSingleTap"), null, 0.2f); } break; case 2: { NSObject.CancelPreviousPerformRequest(this, new MonoTouch.ObjCRuntime.Selector("DidSingleTap"), null); this.PerformSelector(new MonoTouch.ObjCRuntime.Selector("DidDoubleTap"), null, 0.01f); } break; } } }
public override void LayoutSubviews() { base.LayoutSubviews(); NSObject.CancelPreviousPerformRequest(this, new Selector("assignTextDelegateForViewsBeneathView"), this); this.TPKeyboardAvoiding_assignTextDelegateForViewsBeneathView(this); }
public override void TouchesCancelledWithEvent(NSEvent theEvent) { base.TouchesCancelledWithEvent(theEvent); NSObject.CancelPreviousPerformRequest(this, new Selector("DidSingleTap"), null); }