iOS 8.4 UITabelview scrollToRowAtIndexPath在Device中不起作用

时间:2017-01-04 08:57:44

标签: ios objective-c uitableview ipad

我有UITableview使用AutoLayout具有动态行高。 在iOS 8.4中,如果设置为scrollToRowAtIndexPathsetContentOffset,则不会滚动到最后一个索引路径。在iOS 9.x中它正在运行。请帮助

        [tableview scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:arr.count - 1 inSection:RootArr.count - 1] atScrollPosition:UITableViewScrollPositionBottom animated:NO];

1 个答案:

答案 0 :(得分:-1)

dispatch_after(0, dispatch_get_main_queue(), ^{
         [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1] atScrollPosition:UITableViewScrollPositionBottom animated:NO];
});

没关系