Basic for iOS development: Create a Table View application in three different ways
In iOS, the most common control is Table View, which can be understood as a list. In Android, It is a ListView. It is often used in News clients, mailboxes, memos, and other applications. However, implementing this list item in iOS is simpler than that in Android. The following three methods are used to implement a Table View Interface.
(1) template Master-Detail Application
This is a template that can be selected when you create an iOS application. The Table View control has been well integrated and you can add, delete, and display an item. We can develop on this basis.
.
.
.
.
(2) create a blank page for Table View Controller
Drag a Table View Controller into the Main. storyboard, which is a separate blank interface.
..
.
We can see that there is a Prototype Cells above. This is an Item in the list, which is called an Item in Android. The running result is as follows:
.
(3) use the Table View Control
You can drag a Table View control on the blank storyboard that was originally generated. At this time, no cell exists in the Table View, that is, no list items exist, you can drag a Table View Cell to see the Prototype Cell effect in example (2.
.
.
Of course, the number of Cells can be set through Prototype Cells on the right.
.
.
Of course, no data is added to Table View at this time, and the running effect is a blank list.