Single room presentation in the simplest language
1-(Nsinteger) Numberofsectionsintableview: (UITableView *) TableView {2 3 //Return the number of sections.4 return 1;5 }6 7-(Nsinteger) TableView: (UITableView *) TableView numberofrowsinsection: (nsinteger) Section {8 //Return The number of the rows in the section.9 return 1;Ten } One A --(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) Indexpath { -UITableViewCell *cell =[[UITableViewCell alloc] init]; thecell.textlabel.text=@"123"; -Self.tableView.tableFooterView =[[UIView alloc] init]; - - returncell; + } -- (void) Viewdidlayoutsubviews + { A if([Self.tableview respondstoselector: @selector (setseparatorinset:)]) { at[Self.tableview Setseparatorinset:uiedgeinsetsmake (0,0,0,0)]; - } - - if([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) { -[Self.tableview Setlayoutmargins:uiedgeinsetsmake (0,0,0,0)]; - } in } - to- (void) TableView: (uitableview*) TableView Willdisplaycell: (uitableviewcell*) cell Forrowatindexpath: (nsindexpath*) Indexpath + { - if([Cell Respondstoselector: @selector (setseparatorinset:)]) { the [Cell Setseparatorinset:uiedgeinsetszero]; * } $ Panax Notoginseng if([Cell Respondstoselector: @selector (setlayoutmargins:)]) { - [Cell Setlayoutmargins:uiedgeinsetszero]; the } +}
4 about Tableviewcell display is not blank exercise line width and screen