- Let's start, as usual, by creating a new project with the Single View Application template with the name TableViewDemo.
- Click on the View Controller in the storyboard file and go to Editor | Embed In | Navigation Controller to add the current view controller as a root view controller to a UINavigationController.
- Now, drag UITableView from the Object Library and place it as a subview.
- Place the table at origin (0, 0) with the same size as the ViewController view.
- Change its constraints to the following:
TableView.leading = superview.leading TableView.top = superview.top TableView.width = superview.width TableView.height = superview.height
- To let the table view know the information about the data to be displayed and trigger ...