Accessibility 101
Create accessibility by adding descriptive attributes to your UI elements. This programming interface is defined by the informal UIAccessibility
protocol and consists of a set of properties including labels, hints, and values. Together, they act to supply information to VoiceOver to present an audible presentation of your interface.
Either assign these properties in code or add them through Interface Builder (IB). Listing 15-1 shows how you could set a button’s accessibilityHint
property. This property describes how this control reacts to a user action. In this example, the button’s hint updates when a user types a username into a related text field. The hint changes to match the context of the current UI. Instead of giving ...
Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.