public override void TouchesMoved(MonoTouch.Foundation.NSSet touches, MonoTouch.UIKit.UIEvent e) { var bounds = Bounds; var touch = (UITouch)e.TouchesForView (this).AnyObject; Location.X += touch.LocationInView (this).X - StartLocation.X; Location.Y += touch.LocationInView (this).Y - StartLocation.Y; this.Frame = new RectangleF (Location, bounds.Size); haveBeenTouchedOnce = true; }
public override void TouchesBegan(MonoTouch.Foundation.NSSet touches, MonoTouch.UIKit.UIEvent e) { Location = this.Frame.Location; var touch = (UITouch)e.TouchesForView (this).AnyObject; var bounds = Bounds; StartLocation = touch.LocationInView (this); this.Frame = new RectangleF (Location, bounds.Size); }
public override void TouchesEnded (MonoTouch.Foundation.NSSet touches, MonoTouch.UIKit.UIEvent e) { var bounds = Bounds; var touch = (UITouch) e.TouchesForView (this).AnyObject; if (firstTouch) { firstTouch = false; PreviousLocation = touch.PreviousLocationInView (this); PreviousLocation.Y = bounds.Height - PreviousLocation.Y; RenderLineFromPoint (PreviousLocation, Location); } }
public override void TouchesBegan (MonoTouch.Foundation.NSSet touches, MonoTouch.UIKit.UIEvent e) { var bounds = Bounds; var touch = (UITouch) e.TouchesForView (this).AnyObject; firstTouch = true; Location = touch.LocationInView (this); Location.Y = bounds.Height - Location.Y; }