美文网首页iOS错误&解决
iOS 9 中scrollToRowAtIndexPath 定位

iOS 9 中scrollToRowAtIndexPath 定位

作者: 橙_知足常乐 | 来源:发表于2021-06-16 14:44 被阅读0次

解决:

使用dispatch_async(dispatch_get_main_queue(), 方法解决大部分情况

如下:

    NSIndexPath*indexPath = [NSIndexPath indexPathForRow:(self.datas.count-1) inSection:0];

    dispatch_async(dispatch_get_main_queue(), ^{

        [self.mTableView  scrollToRowAtIndexPath:indexPath  atScrollPosition: UITableViewScrollPositionBottom  animated:YES];

    });

相关文章

网友评论

    本文标题:iOS 9 中scrollToRowAtIndexPath 定位

    本文链接:https://www.haomeiwen.com/subject/ggaxyltx.html