【问题标题】:iOS 8.4 UITabelview scrollToRowAtIndexPath is not working in DeviceiOS 8.4 UITabelview scrollToRowAtIndexPath 在设备中不起作用
【发布时间】:2017-05-18 12:06:24
【问题描述】:

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

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

【问题讨论】:

  • 请分享您的代码?

标签: ios objective-c uitableview ipad


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

没关系

【讨论】:

    猜你喜欢
    • 2015-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-25
    • 1970-01-01
    • 2018-09-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多