From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Text, Dynamic Type, and accessibility

Text, Dynamic Type, and accessibility

From the course: iOS Development Tips

Text, Dynamic Type, and accessibility

- [Instructor] Dynamic type is one of the simplest accessibility features you can add in SwiftUI. By default you use dynamic type in your applications. However, dynamic type might cause a few problems you might want to watch out for. Let's take a look. In the exercise files, I have the same text in an Hstack and Vstack with two spacers which I indicated with red and blue backgrounds. I put the text in a green background so we can see the frame changes. Now the spacers are set with low min values. Now the spacers here are set with low min length values. So they're not really interfering with anything yet and not forcing anything. But we can use them to force our sizes on things in terms of the frames for the text. But let's go try something first. I want to go see what happens if I change the font. So I'm going to go down here to font and change that to title, and you can see the title gets these, go into title…

Contents