Skip to content

关于使用Self-Sizing的TableView的一个bug,希望能和你探讨。 #2

Description

@KittenYang

如果一个TableView使用了Self-Sizing,并且cell实现了didSelectRowAtIndexPath方法,点击cell之后present到一个VC,于是奇怪的事情发生了:

列表发生了跳跃,也就是跳到了其他cell。并且这时如果返回列表视图往上滚动滚动列表(注意是往上滚动)你会发现,所有之前self-sizing的cell位置都乱了,全部都发生了距离上的偏移。

目前我唯一能找到的不完全解决方法是:在viewWillDisappear中调用tableView.reloadData(),但这只能保证present的时候不出现跳跃,回到tableview往上滚动仍然会出现cell位置跳跃的情况。目前我只能猜测是iOS8的bug了。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions