Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable Self-Sizing #10

Closed
wants to merge 1 commit into from
Closed

disable Self-Sizing #10

wants to merge 1 commit into from

Conversation

RickeyBoy
Copy link
Contributor

@RickeyBoy RickeyBoy commented Oct 12, 2017

I met this Issue #6 and spent some time to fix this.

It turns out to be that in iOS 11.0 UITableViewAutomaticDimension is the default value of estimatedRowHeight rather than 0. In other words, we have to disable Self-Sizing manually.

In UITableViewAutomaticDimension mode, if we have to reuse cells, TableView is not able to get the right contentSize. While scrolling, new cells come out and cause changes of contentSize.

@adamshin
Copy link
Owner

Thanks for looking into this.. I'm not sure if this is the right solution here, though.

Like you mentioned, automatic cell sizing does cause issues with reordering. And in iOS 11 it looks like you have to manually disable it. But setting estimatedRowHeight to 0 is only part of that -- the user still needs to calculate and return a cell height in their tableView delegate method. We can't do that part automatically.

I'd lean towards adding a note in the documentation for this, so it's clear what the user needs to do (and why). If we do part of it automatically, but not the other part, I'm afraid it could lead to non-obvious issues when people try to use the library.

I'm seeing some other issues with iOS 11 as well... may need to take some time and look into things. 😞

@RickeyBoy
Copy link
Contributor Author

Yeah, I know what you mean. It seems like that adding a note is a better way right now. 😊

@adamshin adamshin closed this Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants