TableView sliding to the bottom, depending on the page can be two ways
The first type: The general style of the tableview without head and tail
#pragmaMark-Slide to the bottom-(void) Scrolltabletofoot: (BOOL) Animated {Nsinteger s= [Self.tableview numberofsections];//How many groups are there?if(s<1)return;//No data is not executed to not crashNsinteger r = [Self.tableview numberofrowsinsection:s-1];//How many rows are in the last groupif(r<1)return; Nsindexpath *ip = [Nsindexpath indexpathforrow:r-1insection:s-1];//take the last row of data[Self.tableview Scrolltorowatindexpath:ip Atscrollposition:uitableviewscrollpositionbottom animated:animated];//Scroll to the last line}
The second kind: with Tablefooterview, if the first sliding, can only slide to the last line, not sliding to the bottom should use the following
-(void) Scrollviewtobottom: (BOOL) animated{ if> Self.tableView.frame.size.height) {
=Cgpointmake (0-self.tableView.frame.size.height); [Self.tableview Setcontentoffset:offset animated:animated];
}}
iOS TableView swipe to the bottom