Adding Our First Table View
Now, let's add a UITableView
into our UIViewController
:
- Open
Explore.storyboard
. - In the Utilities panel, in the filter field, type
tableview
; then, drag the Table View onto the scene: - Select the Pin icon and enter the following values:
- Set all values under Add New Constraints to
0
- Constrain to margins:
unchecked
- Update Frames:
Items of New Constraints
- Set all values under Add New Constraints to
- Now click on Add 4 Constraints.
Updating Our Edges
We now need to correct the gap at the top of our Table View:
- With the View Controller selected (as opposed to the Table View), select ...
Get iOS 10 Programming for Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.