UITableView中selectRowAtIndexPath: animated:scrollPosition滚动到指定Row
- (void)viewDidLoad{
//调用下面封装的方法
[self performSelectorOnMainThread:@selector(didSelectToProperCell) withObject:nil waitUntilDone:NO];
}
//写一个方法
- (void)didSelectToProperCell{
[self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:self.index inSection:0] animated:YES scrollPosition:(UITableViewScrollPositionTop)];
}
本文章属于原文、请勿转载!