Summary
In this chapter, we continued our exploration of SwiftUI’s UI elements. We showed how to display lists of items, allowing views to scroll to the position of elements within a list. We also showed how to make the keyboard appear and disappear. We also shed some light on how SwiftUI actually composes views in containers such as stacks. We also learned how @ViewBuilder
works. Finally, we introduced ScrollViewReader
, which is used to scroll to a specified position inside scrollable content in SwiftUI, programmatically.
In the next chapter, we will talk about grids and dig deeper into navigation.