iOS accessibility - How do you set the accessibility label for the title of a UINavigationBar?

Robert Wagstaff picture Robert Wagstaff · Jul 24, 2012 · Viewed 17.7k times · Source

Apple's voice over mispronounces the title of one of my views, which is inside a UINavigation Controller.

In other parts of the app I have added a custom accessibility label to help it pronounce the company name correctly. How can I set the accessibility label of a UINavigationBar?

Answer

stevekohls picture stevekohls · May 18, 2015

This works in iOS 8.2. In viewDidLoad:

self.navigationItem.accessibilityLabel = @"My accessible label";

When a navigation controller transitions to the view controller, the accessibilityLabel is read instead of the view controller title.