Chapter 3: Using Lists and Tables
There's a good chance that you have built a simple app before, or maybe you have tried but didn't quite succeed. If this is the case, you have likely used UITableView
or UICollectionView
, as both are core components of many iOS applications.
If an app shows a list of items, it was likely built using UITableView
. This chapter will ensure that you are up to speed with the ins and outs of UITableView
and UICollectionView
. In addition to covering the basics, such as how we use the delegation pattern, you'll also learn how to access users' data – in this case, their contacts – which will be rendered in a UITableView
and UICollectionView
object.
We'll finish this chapter by taking a look at lists in SwiftUI, Apple's new UI framework announced back in 2019. We'll touch on the fundamental differences between what SwiftUI and UIKit have to offer.
The following topics will be covered in this chapter...