Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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
Download course materials from Github
Previous: Demo 2 Next: Quiz: Configuring Layouts