예제 #1
0
        public override bool Initialize(GameHost host)
        {
            // UIPointerInteraction is only available on iOS 13.4 and up
            if (!UIDevice.CurrentDevice.CheckSystemVersion(13, 4))
            {
                return(false);
            }

            view.AddInteraction(pointerInteraction = new UIPointerInteraction(mouseDelegate = new IOSMouseDelegate()));
            mouseDelegate.LocationUpdated         += locationUpdated;

            view.AddGestureRecognizer(panGestureRecognizer = new UIPanGestureRecognizer(panOffsetUpdated)
            {
                AllowedScrollTypesMask = UIScrollTypeMask.Continuous,
                MaximumNumberOfTouches = 0 // Only handle drags when no "touches" are active (ie. no buttons are in a pressed state)
            });

            return(true);
        }
예제 #2
0
 public UIPointerStyle GetStyleForRegion(UIPointerInteraction interaction, UIPointerRegion region) =>
 UIPointerStyle.CreateHiddenPointerStyle();
예제 #3
0
 public UIPointerRegion GetRegionForRequest(UIPointerInteraction interaction, UIPointerRegionRequest request, UIPointerRegion defaultRegion)
 {
     LocationUpdated(request.Location);
     return(defaultRegion);
 }