30. An Overview of List, OutlineGroup and DisclosureGroup
The preceding chapters explored the use of the SwiftUI List view to display information to users in an ordered manner. Lists provide a way to present large amounts of information to the user in a navigable and scrollable format.
The features of the List covered so far, however, have not introduced any way to display hierarchical information within a list other than displaying an entirely new screen to the user in response to list item selections. A standard list also has the potential to overwhelm the user with options through which to scroll, with no way to hide sub-groups of items to ease navigation.
In this chapter, we will explore some features that were introduced into SwiftUI with iOS 14 which address these issues, including some enhancements to the List view together with the OutlineGroup and DisclosureGroup views. Once these topics have been covered, the next chapter entitled “A SwiftUI List, OutlineGroup...