I'm porting apps from iOS to Mac using Mac Catalyst and noticed that two- and three-finger tap gestures don't work. Here's some example code:
UIView *test = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];
test.backgroundColor = [UIColor redColor];
[self.view addSubview:test];
UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleColumns:)];
gesture.numberOfTouchesRequired = 2;
gesture.delegate = self;
[test addGestureRecognizer:gesture];
If I tap the red box with two fingers on my Magic Trackpad, nothing happens. The target method isn't called, nor are the gesture delegate methods like gestureRecognizer:shouldReceiveTouch:. However, if I comment out the numberOfTouchesRequired line, then a one-fingered tap works.
I don't see anything about this limitation in the documentation, and apparently it's not a general limit with multi-touch because a UIPinchGestureRecognizer works as expected. Am I missing something, or should I file a bug report?