Member-only story

Two UITableViews One UIViewController

That must be chocolate ice-creme

Steven Curtis
3 min readMay 25, 2020
Photo by Tim Graf on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging

Prerequisites:

Terminology

UITableView: A view that presents data using rows arranged in a single column

View controller: Sits between the view and the model, tying them together (usually using the delegate pattern). The controller is not tightly bound to a concrete view, and communicates via a protocol to an abstraction. An example of this is the way that a UITableView communicates with its data source through the UITableViewDataSource protocol. Think of it as the how of the App. The primary job of the controller is to format the data from the model for the view to display.

The challenge

What would happen if I were to whack two UITableView instances into a single view controller?

How might both instances communicate with the dataSource and the delegate?

--

--

No responses yet