This repository has been archived by the owner on Nov 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Support UITableView moveSection:toSection: #20
Milestone
Comments
Sorry for the late answer. What is the crash please? @rholstad |
The crash is the dreaded UITableView Invalid update. Here is the stack trace:
I reproduced in the provided sample application by adding a button on top of the @IBAction func buttonPressed(_ sender: UIButton) {
expandableTableView .moveSection(2, toSection: 0)
} If all sections from 0 to 2 are not expanded, there are no problems. If all sections from 0 to 2 are expanded, there are no problems. But any other combination of section expansion from 0 to 2 exists, it crashes. Since |
Thanks! Will look into this soon. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Visible sections is not updated when using moveSection:toSection:. So, if you try to move a section that is expanded to a location of a section that is not expanded, it will crash. I wrote an override for moveSection:toSection which works, but only for single moves. It will not work when moving multiple sections using performBatchUpdates:completion: or beginUpdates() and endUpdates().
The text was updated successfully, but these errors were encountered: