Пример #1
0
            public override void TouchesEnded(NSSet touches, UIEvent evt)
            {
                base.TouchesEnded(touches, evt);

                bool currentlySelected = cover.SuperLayer != null;
                int  selIdx            = selected;

                StopTracking();

                if (currentlySelected)
                {
                    if (Selected != null)
                    {
                        Selected(selIdx);
                    }
                    parent.CancelMenu();
                }
            }
Пример #2
0
            public override void TouchesBegan(NSSet touches, UIEvent evt)
            {
                var touch = touches.AnyObject as UITouch;

                touchStart = touch.LocationInView(this);

                // If the menu is not active
                if (container.MenuHostElement == null || container.MenuHostElement != container.TweetElementFromPath(IndexPathForRowAtPoint(touchStart.Value)))
                {
                    if (capturedEnded != null)
                    {
                        TouchesCancelled(capturedEnded.Touches, capturedEnded.Event);
                        capturedEnded = null;
                    }
                    container.CancelMenu();
                    swipeDetectionDisabled = false;
                }

                base.TouchesBegan(touches, evt);
            }