ios专题

ios自动滚动tableView到某行

2016-08-10  本文已影响437人  HeavenWong
[self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:_currentRow inSection:0]
animated:YES
  scrollPosition:UITableViewScrollPositionMiddle];

UITableViewCell自动滚动到顶部

[tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];

上一篇 下一篇

猜你喜欢

热点阅读