public override void TouchesBegan(Foundation.NSSet touches, UIEvent evt) { var touch = touches.AnyObject as UITouch; if (Magnifier == null) { Magnifier = new Magnifier(); } if (Magnifier.ViewToMagnify == null) { Magnifier.ViewToMagnify = this; } var touchPoint = touch.LocationInView(this); Magnifier.TouchPoint = touchPoint; this.Superview.AddSubview(Magnifier); if (ShowOnTouch) { ShouldDisplay = true; } Magnifier.SetNeedsDisplay(); }
public MagnifierView() { MagnifyingGlassShowDelay = DefaultShowDelay; Magnifier = new Magnifier(); Magnifier.Alpha = 0.0f; this.ExclusiveTouch = false; }
public MagnifierView () { MagnifyingGlassShowDelay = DefaultShowDelay; Magnifier = new Magnifier (); Magnifier.Alpha = 0.0f; this.ExclusiveTouch = false; }
public override void TouchesBegan (Foundation.NSSet touches, UIEvent evt) { var touch = touches.AnyObject as UITouch; if (Magnifier == null) Magnifier = new Magnifier (); if (Magnifier.ViewToMagnify == null) Magnifier.ViewToMagnify = this; var touchPoint = touch.LocationInView (this); Magnifier.TouchPoint = touchPoint; this.Superview.AddSubview (Magnifier); Magnifier.SetNeedsDisplay (); //if (Magnifier.Frame.Contains (touch.LocationInView (this))) System.Diagnostics.Debug.WriteLine ("touching"); }
protected override void Dispose(bool disposing) { if (disposing) { if (this.Subviews.Any()) { for (int i = this.Subviews.Count() - 1; i >= 0; i--) { this.Subviews [i].RemoveFromSuperview(); } } if (Magnifier != null) { Magnifier.RemoveFromSuperview(); Magnifier.Dispose(); Magnifier = null; } } base.Dispose(disposing); }
protected override void Dispose (bool disposing) { if (disposing) { if (this.Subviews.Any ()) { for (int i = this.Subviews.Count() - 1; i >= 0; i--) { this.Subviews [i].RemoveFromSuperview (); } } if (Magnifier != null) { Magnifier.RemoveFromSuperview (); Magnifier.Dispose (); Magnifier = null; } } base.Dispose (disposing); }