From the course: iOS App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Traits

Traits - iOS Tutorial

From the course: iOS App Development: Accessibility

Start my 1-month free trial

Traits

- [Man] You might have noticed that when Voiceover announces our Favorites button, it adds the words Button and Selected. Let's listen again. - [Voiceover] Selected, in Favorites, yes, Button. - [Man] We didn't add those, so where did they come from? In addition to setting Accessibility labels and Accessibility hints, we can also use Accessibility traits to describe the behavior of a user interface element. Some traits characterize an element by identifying its behavior with the behavior of a particular type of object, like a button or an image. Other traits characterize an element by describing a specific behavior the element can exhibit, such as the ability to play a sound. Let's take a look at the different traits that are available to us. I'm in Xcode, and I'm currently looking at my Main.storyboard file. I'm in the Bridge Scene. And if I select an image view at the bottom, and make sure the Identity Inspector is visible, I can scroll down and see the Accessibility section. Here…

Contents