Table View Controllers in Swift
summary
Builds a reusable UITableViewController that actually works: starts with a concrete Person table, then generalizes with generics so the same controller displays Pokemon or people, swaps a cell-configuration method for a passed-in closure to customize subtitle or detail, adds editing with delete and an undo history implemented as a generic struct that toggles the undo bar button, and finally pulls many initializer flags into a single configuration struct for easy reuse and testing. Uses Swift, UITableViewController, Xcode and playgrounds; code runs.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:48Create Table View Controller
- 2:48Create Cell
- 4:51Configure Cell
- 7:14Generics
- 9:10Editing
- 12:23Undo
- 16:10Undo function
- 17:40Clean up
- 19:00Simpler table view
- 21:00Testability
- 21:50Initializer
- 22:11Summary
- 24:18Examples
- 24:43Tiny Networking
- 26:28Conclusion
related talks
18mMaking Table Views Great Again!
43mRefactoring a Massive View Controller in Swift
28mFlexible View Controller Interfaces With Swift 4
17mMVC: Many View Controllers
18mBuckets of Code
21mOptimizing Swift code for separation of concerns and simplicity
40mPractical Generics in Swift
31m5 Steps to Better SwiftUI Views
