Now I have a very simple code setup for gesture recognition. However, when my device has VoiceOver turned on, and I try to use the gesture double-tap function (to send a gesture through voiceOver to the application), it does not seem to recognize the gesture.
To clarify more: Usually, if you use the application with voice control turned on, and the application has some gesture recognition, you can press and hold twice for a second, and the voice acting will reproduce the tone. Then you can perform the gesture, and it will be transmitted through the voice to the application. My problem is that double-clicking and holding the voice-overs do not reproduce the tone.
So, I am wondering if there is something that I have to include in my code in order to notify the voice-overs that my application will use a gesture or something like that.
code:
- (void)viewDidLoad { [super viewDidLoad]; // Swipe Left UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeLeft:)]; swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft; [self.view addGestureRecognizer:swipeLeft]; [swipeLeft release]; // Swipe Right UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeRight:)]; swipeRight.direction = UISwipeGestureRecognizerDirectionRight; [self.view addGestureRecognizer:swipeRight]; [swipeRight release]; } - (void)handleSwipeLeft:(UISwipeGestureRecognizer *)recognizer { CGPoint location = [recognizer locationInView:self.view]; NSLog(@"Swipe left started at (%f,%f)",location.x,location.y); UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"Swipe Left"); } - (void)handleSwipeRight:(UISwipeGestureRecognizer *)recognizer { CGPoint location = [recognizer locationInView:self.view]; NSLog(@"Swipe right started at (%f,%f)",location.x,location.y); }
source share