Revisiting the Journal List screen
Remember the JournalListViewController
class in Chapter 11, Building Your User Interface? This is an example of a view controller that manages a table view. Note that the code for this class is very similar to that in your playground. The differences are as follows:
- You created and assigned the table view to the
tableView
inTableViewExampleController
programmatically, instead of using the assistant. - You set the dimensions of the table view programmatically in
UITableView(frame:)
, instead of using the Size inspector and constraints. - You connected the data source and delegate outlets to the view controller programmatically, instead of using the Connections inspector.
- You set the reuse identifier and UI element color programmatically, instead of using the Attributes inspector.
- You added the table view as a subview of the view for
TableViewExampleController
programmatically, instead of dragging in a Table View object...