示例#1
0
 public void HandleCalloutClick(UIControl control)
 {
     Console.WriteLine("TestView.HandleCalloutClick");
     if (callout != null) {
         callout.RemoveFromSuperview();
         callout = null;
     }
 }
示例#2
0
        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;
 }
示例#4
0
        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);
        }