One, custom cell( including the cell's customization, and the method of direct assignment ) a custom cell is a subclass that creates a UITableViewCell . encapsulates the creation of controls on a cell in a subclass, simplifying The code in Uiviewcontroller Sample Code Analysis: (This example includes the cell's customization, and the method of assigning the value directly) 1. The Tabelviewcell class needs to be established in which to add the cell controls 2. initialization in TABELVIEWCELL.M, and operation of layoutsubviews frame layout Tabelviewcell. h Defining Attributes Tabelviewcell. M to initialize
Second, establish model for data transmission data transfer patterns between MVC the model passes data in two ways: (1. Define a property, implement data passing by overriding its Setter Method 2. Define the method, and then implement the method in. m, which is to implement data passing)Example code: (Two methods are in it)Step: 1. Create the Model attribute class and define the properties2. Making a property or method definition in a Tabelviewcell subclass
3. Passing data to model in VIEWCONTROLLER.M4. In the Tabelviewcell sub-class , assign a value to the control viewcontroller.m file the created student.h fileTabelviewcell sub-class for creating child controls on the cellthird,cell adaptive height
First Lecture: UITableView Advanced custom cell, cell adaptive height