Traits
Traits characterize UIKit item behaviors. VoiceOver uses these traits while describing interfaces. As Figure 15-1 shows, there are numerous possible traits you can assign to views. Select the traits that apply to the selected view, keeping in mind that you can always update these choices programmatically.
Traits help characterize the elements in your interface to the VoiceOver system. They specify how items behave and how VoiceOver should treat them. You set them via the accessibilityTraits
property, by selecting a single flag or OR’ing two or more flags. You can also set them in IB, as you saw in Figure 15-1. These traits vary in how they operate and how VoiceOver uses them.
At the most basic, default level, there’s the “no trait” flag: ...
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.