IOS table View class UITableView
Protocol implemented: Uitableviewdatasource,uitableviewdelegate
The following 3 methods must be implemented:
-(Nsinteger) Numberofsectionsintableview: (uitableview*) TableView {
return 1;
}
-(Nsinteger) TableView: (uitableview*) TableView numberofrowsinsection: (nsinteger) Section {
return 3;
}
-(uitableviewcell*) TableView: (uitableview*) TableView
Cellforrowatindexpath: (nsindexpath*) Indexpath
{
}
Optional method:
-(void) TableView: (uitableview*) TableView
Didselectrowatindexpath: (nsindexpath*) Indexpath
{
}
-(BOOL) TableView: (uitableview*) TableView Caneditrowatindexpath: (nsindexpath*) Indexpath {
return ( 1 = = Indexpath. section);
}
-(nsstring*) TableView: (uitableview*) TableView titleforheaderinsection: (nsinteger) Section {
return @ "title";
}
-(void) TableView: (uitableview*) TableView Willbegineditingrowatindexpath: (nsindexpath *) Indexpath {
}
-(void) TableView: (uitableview*) TableView Didendeditingrowatindexpath: (nsindexpath*) Indexpath {
}
-(void) TableView: (uitableview*) TableView
Commiteditingstyle: (uitableviewcelleditingstyle) Editingstyle
Forrowatindexpath: (nsindexpath*) Indexpath
{
I F (uitableviewcelleditingstyledelete = = Editingstyle) {
}
}
IOS UITableView Table View detailed