0

I'm building a simple walkthrough at the beginning of my app. This walkthrough needs to be accessible to voiceOver users. In other apps, I've noticed that visually impaired users can swipe up and down on UIPageControl and travel between different view controllers.

Here's the code I have the moment, this is in my UIPageViewController, is there a particular property i need to set?

 func configurePageControl() {
        // The total number of pages that are available is based on how many available colors we have.
        pageControl = UIPageControl(frame: CGRect(x: 0,y: UIScreen.main.bounds.maxY - 150,width: UIScreen.main.bounds.width,height: 50))
        self.pageControl.numberOfPages = orderedViewControllers.count
        self.pageControl.currentPage = 0
        self.pageControl.tintColor = UIColor.white
        self.pageControl.pageIndicatorTintColor = UIColor.black
        self.pageControl.currentPageIndicatorTintColor = UIColor.white
        self.view.addSubview(pageControl)
        pageControl.isUserInteractionEnabled = true
        pageControl.isAccessibilityElement = true
    }

And this is my viewDidLoad() :

override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.dataSource = self
        self.delegate = self
        configurePageControl()
        if let firstViewController = orderedViewControllers.first {
            setViewControllers([firstViewController],
                               direction: .forward,
                               animated: true,
                               completion: nil)

        }
    }

I'm instantiating this pageControl element programmatically and not dragging this from the storyboard.

Thanks!

Shivam Tripathi
  • 1,405
  • 3
  • 19
  • 37

1 Answers1

1

You need to use the three finger swipe to navigate forward and backwards in the page view.

Maria
  • 4,471
  • 1
  • 25
  • 26
  • Hey Maria, Thanks for letting me know about this. Are voiceOver users generally aware of this gesture? Thanks! – Karthik Kannan Apr 11 '18 at 08:41
  • Hi Karthik, not really sure, it's a whole new world navigating through an app with VoiceOver and some actions are not available. You really have to design you UI for this – Maria Apr 11 '18 at 16:35
  • @Karthik. I found this link https://developer.apple.com/library/content/technotes/TestingAccessibilityOfiOSApps/TestAccessibilityonYourDevicewithVoiceOver/TestAccessibilityonYourDevicewithVoiceOver.html – Maria Apr 12 '18 at 17:00