Using ScrollView can be a quick and valid solution when the UI that you have to build is really big and is expected to be partially out of bounds. It allows users to scroll the view to access the rest of the content. This can also be a solution to handle landscape orientation since SwiftUI supports both portrait and landscape orientation out of the box.
This also can help handling bigger fonts from accessibility options.
But while this works, adapting the UI to better use the available space delivers a better user user experience. And because SwiftUI views works on all of Apple’s platforms, you have to design your apps in a way to better use each devices strengths.
In this lesson, you learned:
The difference between portrait and landscape orientations.
How to design UI while still being inclusive of accessibility options.
How to use ScrollView to solve the problem of content being out of bounds.
About Device size classes and how you can use them to adapt the UI depending on the amount of available space on screen.
If you want to learn more about Device size classes, make sure to check out Apple’s Human Interface Guidelines: Layout to learn about the different values horizontal and vertical layouts may have depending on the device.
In the next lesson, you’ll learn about cool native SwiftUI views that allow you to change the layout of the container view without swapping between VStack and HStack.
See forum comments
This content was released on Jun 20 2024. The official support period is 6-months
from this date.
Here, we go over the highlights of the lesson and what’s next in lesson 3.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.