Fix dragging mouse on iOS 13

Fixes #440
This commit is contained in:
Cameron Gutman
2020-12-18 17:10:16 -06:00
parent e29313d9b6
commit 949f088ef5

View File

@@ -92,6 +92,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
UIPanGestureRecognizer *mouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMoved:)];
mouseWheelRecognizer.maximumNumberOfTouches = 0;
mouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskAll;
mouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
[self addGestureRecognizer:mouseWheelRecognizer];