From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

SwiftUI ScrollView

SwiftUI ScrollView

- [Instructor] One view you have available in Swift UI view is scroll views, which are a lot easier to work with than their UIkit counterparts. If you take a look at the downloaded exercise files, you'll find a little app I wrote to preview the SF symbols for numbers zero through 50. And if you zoom out a little bit here, and I'm going to go ahead and run that. You can see that I can click a number here, although they're hard to see, and I can click a color, and I can pick hollow or circle square and all this kind of stuff. So I can see all these different things. However, it's hard to read this. So here's where a scroll view will help in all these cases. A default scroll view is a vertical scroll view. You'll usually have a stack within the scroll view for items iterated to be in the same direction as the scroll view. So for a vertical one, I can change the numbers vertically. So let's put this around the numbers…

Contents