Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable Voice Over 3 finger swipe gesture for UIPageViewController

I'm using UIPageViewController in my App, however I noticed that when Voice Over is enabled, the "three finger swipe" shortcut does not work (like it does on home screen). Does anyone know if there is a standard way to enable this (like most other VO features)? Or do I need to manually detect swipe gestures myself.

like image 916
Epic Byte Avatar asked Sep 26 '14 20:09

Epic Byte


1 Answers

Ok after much searching I found that I need to override the method below to detect the VO Swipe. From there I can manually present the next and previous view controllers.

-(BOOL)accessibilityScroll:(UIAccessibilityScrollDirection)direction {

    if (direction == UIAccessibilityScrollDirectionRight) {
      //Previous Page

    } else if (direction == UIAccessibilityScrollDirectionLeft) {
     //Next Page   
    }

    return YES;
}
like image 191
Epic Byte Avatar answered Oct 09 '22 02:10

Epic Byte