Example #1
0
        public void InvokeOnMainThread(System.Action action)
        {
            _executionQueue.Enqueue(action);

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

            _controller.BeginInvokeOnMainThread(nsa);
        }
 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();
         }
     });
 }
Example #3
0
		public void InvokeOnMainThread (System.Action action)
		{
			_executionQueue.Enqueue (action);

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

			_controller.BeginInvokeOnMainThread (nsa);
		}