1 2 3 4 5 6 7 8 9 10
| [self.commentTab reloadData]; [self.commentTab layoutIfNeeded];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ NSInteger rows = [self.commentTab numberOfRowsInSection:0]; NSIndexPath *ip = [NSIndexPath indexPathForRow:rows-1 inSection:0]; [self.commentTab scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:YES]; });
|