First, TableView
1. DataSource Data source
(1 The method of constructing each Tableviewcell:cellforrowatindexpath, the
Dequeuereusablecellwithidentifier will take the cell in the storyboard based on the identification ID, and it also uses the cell multiplexing in the cache
(2 also contains two other methods, numberofsectionsintableview default is to return 1 if you do not rewrite it, numberofrowsinsection is not the default value, so when implementing the data source this must be implemented
-(Nsinteger)numberofsectionsintableview:(UITableView *) sender;
-(Nsinteger) TableView: (UITableView *) sender numberofrowsinsection:(nsinteger) section;
2, delegate agreement, there are many ways, here just for example two
(1 For example, what line does the user order?) What's the operation?
-(void) TableView: (UITableView *) sender Didselectrowatindexpath:(Nsindexpath *) path
(2 Click on the icon for each cell as follows:
-(void) TableView: (UITableView *) sender Accessorybuttontappedforrowwithindexpath:(Nsindexpath *) Indexpath
3, Segue click on the cell to jump,
For example, jump to another segue, then the corresponding Prepareforsegue should know which cell is clicked, so the sender parameter has played this role
We can use nsindexpath *indexpath = [Self.tableview indexpathforcell:sender];
4. Spinner in loading
@property (strong) Uirefreshcontrol *refreshcontrol;
Turn on Load animation:-(void) beginrefreshing;
End Load Animation:-(void) endrefreshing;
Of course you need to start the configuration:
5. Reloaddata Reload Data
-(void)reloadrowsatindexpaths:(Nsarray *) indexpaths withrowanimation: (uitableviewrowanimation) Animationstyle;
Details of the TableView method can refer to the previous written article: http://www.cnblogs.com/daomul/p/4370128.html
OC Development _storyboard--uitableview