コード例 #1
0
        public void InvokeOnMainThread(System.Action action)
        {
            _executionQueue.Enqueue(action);

            MonoTouch.Foundation.NSAction nsa = new MonoTouch.Foundation.NSAction(InvokeOnMainThreadCallback);

            _controller.BeginInvokeOnMainThread(nsa);
        }
コード例 #2
0
 public LongPressElement(ShoppingItem item, MonoTouch.Foundation.NSAction tappedAction,MonoTouch.Foundation.NSAction longPressAction)
     : base(item.Item,tappedAction)
 {
     this.item = item;
     this.longPressAction = longPressAction;
     gester = new UILongPressGestureRecognizer ();
     gester.Delegate = new LongPressGestureDelegate ();
     gester.MinimumPressDuration = .5;
     gester.AddTarget (x => {
         if ((x as UILongPressGestureRecognizer).State == UIGestureRecognizerState.Began)
         {
             longPressAction();
         }
     });
 }
コード例 #3
0
		public void InvokeOnMainThread (System.Action action)
		{
			_executionQueue.Enqueue (action);

			MonoTouch.Foundation.NSAction nsa = new MonoTouch.Foundation.NSAction (InvokeOnMainThreadCallback);

			_controller.BeginInvokeOnMainThread (nsa);
		}