View uitableview. h file
The structure seems very simple.
There are two protocols.Uitableviewdelegate,Uitableviewdatasource, A classNsindexpath
ForUitableviewdelegateProtocol, which is written in Apple's file:
This represents the display and behaviour of the cells.
My understanding is various operations on cells. In fact, it also contains the form of table display and so on.
ForUitableviedatasourceProtocol, which is written in Apple's file:
This Protocol represents the data model object. As such, it supplies no information about appearance (including the cells)
In my understanding, this protocol is used to process various data-related operations, excluding any interface operations.
This Protocol has two methods that must be implemented:
Tableview: numberofrowsinsectionAndTableview: cellforrowatindexpath:Two methods are required for the data source of each table view. The former tells the table view how many rows of cells exist, and the latter tells the table view what the content of each cell is.ProgramBy implementing these two methods, you can provide the basic information required by a table view and call the table view.