UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:usingPresentationValues:]: row (42) beyond bounds (42) for section (0).
在tableview reloadData的同事,定位到最后一行,tableview还没有刷新完,就会引起崩溃
解决办法
CGPoint offset = CGPointMake(0,self.tableview.contentSize.height - self.tableview.frame.size.height);
[self.tableview setContentOffset:offset animated:NO];
放弃
[self.tableview scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:count - 1 inSection:0] atScrollPosition:UITableViewScrollPositionNone animated:NO];
网友评论