首页 > 代码库 > tableVIew/scrollVIew,点击按钮滑倒最下/最上.

tableVIew/scrollVIew,点击按钮滑倒最下/最上.

//scrollVIew
1
//跳到最前2 [_scrollView scrollRectToVisible:CGRectMake(0, 0, self.view.frame.size.width, 10) animated:YES];3 //跳到最后4 [_scrollView scrollRectToVisible:CGRectMake(0, kHeight + 200 + _webView.frame.size.height, self.view.frame.size.width, kHeight + 250 + _webView.frame.size.height) animated:YES];
//tableView
1
//跳到最前2 [_tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:YES];3 //跳到最后4 [_tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:self.frameArray.count - 1 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];

 

tableVIew/scrollVIew,点击按钮滑倒最下/最上.