2.storyboard Custom Cell
1) Create the Tableviewcontroller first, create the class that inherits the UITableViewCell
2) Associate the cell of the page in Main.storyboard with the custom cell class, fill in the class name of the custom cell with the class in the cell's custom class, and fill in the TableView cell identifier
3) in the Tableviewcontroller class, create a cell with a custom cell class and overwrite the identifier value to correspond to the identifier of the custom cell.
4) in storyboard, give the page layout, associate the control to the. h or. m of the custom cell, create the control and assign the value in the Custom cell class
The assignment is best done in the tableViewCell class (the stored data array is passed directly through the cell to the Tableviewcell class:
cell. s = self. Students [Indexpath. Row ];
and then in assignment in the Layout Child view method (this method is called before each cell is displayed)
-(void) layoutsubviews{
[Super layoutsubviews];
}
Lan Yi Education September 18 record