ise*_*sky 5 cell uitableview ios ios8
当我第一次出现视图时,当我尝试一直滚动到表格视图的底部时,它不会滚动到正确的底部单元格.它接近结束但不完全.
如果稍后再次调用该方法,则会滚动到底部.现在我的解决方案是滚动两次,它只有在第二个延迟时才有效.
我想知道这是否是iOS 8中的一个错误,或者是否有任何我可以以正确的方式实现的.
NSIndexPath* path = [NSIndexPath indexPathForRow:[self.someArray count] - 1 inSection:0];
[self.someList scrollToRowAtIndexPath:path
atScrollPosition:UITableViewScrollPositionBottom
animated:NO];
//TODO: this is kindof a dirty hack for now, there seems to be a bug in ios8 auto sizing cells and figuring out the proper scroll location
dispatch_after(0, dispatch_get_main_queue(), ^{
[self.someList scrollToRowAtIndexPath:path
atScrollPosition:UITableViewScrollPositionBottom
animated:NO];
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1117 次 |
| 最近记录: |