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.
Asked
Active
Viewed 2,984 times
16
-
Care to explain down vote? Also I am not seeking debugging help, so the close vote doesn't really make much sense. – Epic Byte Sep 26 '14 at 20:52
-
This works by default now in iOS 8. It has swipe up and down gestures. – GoodSp33d Feb 16 '15 at 07:01
2 Answers
17
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;
}

Epic Byte
- 33,840
- 12
- 45
- 93
-
2Note that you should swap your next and previous to behave as expected. Swiping to the right should show the previous page, swiping to the left should show the next page. – Jordan H Dec 29 '14 at 00:21
3
Thanks Epic, this helped me a lot! Just thought I would add a Swift version for folks.
Swift 4.0:
override func accessibilityScroll(_ direction: UIAccessibilityScrollDirection) -> Bool {
if direction == .right {
// Previous Page
} else if direction == .left {
// Next Page
}
return true
}

Shalin Shah
- 8,145
- 6
- 31
- 44

D. Pratt
- 444
- 8
- 15