Method:
-(UITableViewCell *) TableView: (uitableview *) TableView Cellforrowatindexpath: (nsindexpath *) indexpath{
//Create cell
UITableViewCell *cell = [[uitableviewcell alloc]initwithstyle: Uitableviewcellstyledefault reuseidentifier:nil];
// set a picture of the cell
nsstring *imagename = [nsstring stringWithFormat:@ "00%ld.png", Indexpath. Row + 1];
Cell. ImageView. image = [UIImage imagenamed:imagename];
set The primary title of the cell
NSString * Text = [nsstring stringWithFormat:@ " product -%ld", Indexpath. Row + 1];
Cell. Textlabel. text = text;
// Set the header of the cell , which is displayed in relation to the style when the cell was created
style = Uitableviewcellstyledefault: Caption Not displayed, picture displayed
style = UITableViewCellStyleValue1: With title and wish title parallel display, picture display
style = UITableViewCellStyleValue2: With caption displayed, picture not displayed
style = Uitableviewcellstylesubtitle: With title and main title up and down, picture display
nsstring *subtitle = [nsstring stringWithFormat:@ " product-%ld very good ", Indexpath. Row + 1];
Cell. Detailtextlabel. text = subtitle;
//Set icon to the right
Cell. accessorytype = Uitableviewcellaccessorydisclosureindicator;
return cell;
}
Set the cell 's height ( inherit delegate method: Not only < Uitableviewdatasource, Uitableviewdelegate, and thecontroller with TableView datasource connection)
-(cgfloat) TableView: (uitableview *) TableView Heightforrowatindexpath: (nsindexpath *) indexpath{
return ;
}
UITableViewCell settings (with title/height/logo on the right)