Iterating Views, Scroll Views, FocusState, Lists, and Scroll View Reader
In this chapter, we will look at how to display lists in SwiftUI, in particular, views that have scrollable contents, either with scroll views or lists. We will also add a bit more functionality to our text fields by allowing the system keyboard to be shown or hidden on iOS. We will briefly touch on the topic of NavigationView
, in order to display the titles of views.
In this chapter, we are going to cover the following main topics:
- Iterating views
- Hiding or showing the keyboard in a form using
@FocusState
@SwiftUIBuilder
and the limit of only 10 views- Controlling scrolling programmatically using
ScrollViewReader