This article reprinted to http://mrjeye.iteye.com/blog/1278521
-(void) Scrolltabletofoot: (BOOL) animated
{
Nsinteger s = [Self.tableview numberofsections];
if (s<1) return;
Nsinteger r = [Self.tableview numberofrowsinsection:s-1];
if (r<1) return;
Nsindexpath *ip = [Nsindexpath indexpathforrow:r-1 insection:s-1];
[Self.tableview Scrolltorowatindexpath:ip Atscrollposition:uitableviewscrollpositionbottom animated:animated];
}
############
- Can be implemented in viewdidappear to join [Tablvew setcontentoffset:cgpointmake (0,480) Animated:yes];
- Add a searchbar to the TableView, scroll together, and initially hide the Headerview (the height that lets tableview scroll up headerview: Default 44)
- Uisearchbar *mysearchbar = [[Uisearchbar alloc] init];
- [Mysearchbar SizeToFit];
- Tableview.tableheaderview = Mysearchbar;
- UITableView start scrolling to the position (so that the first Headerview is not displayed)
- [TableView setcontentoffset:cgpointmake (0.0, 44.0) Animated:no];
UITableView Scroll to the last line