我有一个自定义单元格的tableview,其动态单元格高度取决于单元格内容.
我的问题如下,当我在viewDidLoad中以编程方式询问滚动到它工作的给定位置,除了最后一行.有时行出现但不完整,有时甚至不出现.在这两种情况下,我都必须手动滚动才能看到该行.
这是代码:
[self.tableView reloadData];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:aRow inSection:aSection];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES ];
Run Code Online (Sandbox Code Playgroud)
这是iOS的错误吗?任何解决方法?