public override void TouchesEnded(Foundation.NSSet touches, UIEvent evt) { base.TouchesEnded(touches, evt); var touch = touches.FirstOrDefault() as UITouch; if (touch != null) { var location = touch.LocationInView(this); if (location.X > Frame.Width || location.X < 0 || location.Y > Frame.Height || location.Y < 0) { return; } UIApplication.SharedApplication.OpenUrl(NSUrl.FromString($"http://appropio.com?utm_source={NSBundle.MainBundle.InfoDictionary["CFBundleIdentifier"]?.ToString()}"), new UIApplicationOpenUrlOptions(), (obj) => { }); } Animate(0.2f, () => Alpha = 1); }
public override void TouchesMoved(Foundation.NSSet touches, UIEvent evt) { base.TouchesMoved(touches, evt); var touch = touches.FirstOrDefault() as UITouch; if (touch != null) { var location = touch.LocationInView(this); if (location.X > Frame.Width || location.X < 0 || location.Y > Frame.Height || location.Y < 0) { Animate(0.2f, () => Alpha = 1); } else { Animate(0.2f, () => Alpha = 0.2f); } } else { Animate(0.2f, () => Alpha = 1); } }