public void HandleCalloutClick(UIControl control) { Console.WriteLine("TestView.HandleCalloutClick"); if (callout != null) { callout.RemoveFromSuperview(); callout = null; } }
public void ShowCalloutAt(PointF point) { if (callout != null) { callout.RemoveFromSuperview(); callout = null; } callout = CalloutView.AddCalloutView(this, "Teleport", point, this, new Selector("handleCalloutClick:")); }
public static CalloutView AddCalloutView(UIView parent, string text, PointF pt, NSObject target, Selector sel) { CalloutView callout = new CalloutView (text, pt, target, sel); callout.ShowWithAnimation (parent); return callout; }
public override void TouchesBegan(NSSet touches, UIEvent evt) { Console.WriteLine("TestView.TouchesBegan"); StopTimer(); if (callout != null) { callout.RemoveFromSuperview(); callout = null; } touchPoint = ((UITouch)touches.AnyObject).LocationInView(this); timer = NSTimer.CreateScheduledTimer(.5, this, new Selector("expand:"), null, false); base.TouchesBegan (touches, evt); }