public override void TouchesEnded(NSSet touches, UIEvent evt)
        {
            base.TouchesEnded(touches, evt);
            UITouch touch = touches.AnyObject as UITouch;

            var cgPoint = touch.LocationInView(this);
            var point   = new SKPoint((float)ContentScaleFactor * (float)cgPoint.X, (float)ContentScaleFactor * (float)cgPoint.Y);
            var rect    = new SKRect(point.X - 25f, point.Y - 25f, point.X + 50f, point.Y + 50f);

            if (closeButton.TouchUpInside(rect))
            {
                CloseButtonTouched?.Invoke(this, new EventArgs());
            }

            if (trashButton.TouchUpInside(rect))
            {
                TrashButtonTouched?.Invoke(this, new EventArgs());
            }

            if (sendButton.TouchUpInside(rect))
            {
                SendButtonTouched?.Invoke(this, new EventArgs());
            }

            buttons.ForEach((btn) => btn.Touched = false);
        }
Exemple #2
0
        void ControlsOverlayView_TrashButtonTouched(object sender, EventArgs e)
        {
            takenPhotosOverlayView.RemoveLastTappedCell();
            TrashButtonTouched?.Invoke(this, new EventArgs());

            if (Photos.Count == 0)
            {
                CloseButtonTouched?.Invoke(this, new EventArgs());
            }
            else
            {
                takenPhotosOverlayView.SelectLastItem();
            }
        }