Table Views and Collection Views
Implement and customize UITableView and UICollectionView for displaying dynamic lists and grids of content.
Meet UITableView
Welcome to lists! UITableView is a fundamental UIKit component used to display scrollable lists of data, commonly seen in apps for settings, contacts, or news feeds.
It's optimized for efficiency, only rendering the cells visible on screen, which makes it perfect for long lists without performance issues.
Data & Behavior for Tables
To work with a UITableView, you primarily interact with two protocols:
UITableViewDataSource: This tells the table view what data to display (e.g., number of rows, content for each cell).UITableViewDelegate: This handles how the table view behaves (e.g., row selection, height of rows, custom actions).
Your view controller typically conforms to both.
All lessons in this course
- UIView and UIViewController
- Common UI Controls and Events
- Table Views and Collection Views
- Auto Layout with NSLayoutConstraint