-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Best practice to expand a cell animated in a section? #711
Comments
@PhilCai1993 what determines the height of cell2? Is it the data itself? A member/property of the data? Can you not just call |
one property of the data |
@PhilCai1993 As long as the data makes its way to the section controller, the invalidate API should work exactly the same as |
@rnystrom I'll post some examples later at the weekend. |
Going to close as resolved. 😄 |
@jessesquires 😄 OK, I did post any example because I'm busy with my work😂. Could I reopen it when examples are post? |
I've read #499 and #459 , But still quite confused.
The image above is a section controller, "cell2" is expanded when some extra data is received from HTTP request. The single section is composed of a red header and serval cells(I didn't make each cell a section because the whole list is rather complicated, there are a lot of other kind of sections).
The section controller has a "model", naming "SectionObject" for example.
If I want to expand the "cell2", I found the index of data which represent "cell2", modify that data, then call
reloadInSectionController:atIndexes:
inIGListBatchContext
. The cell did expand with a default animation. But if I want to take advantage of the invalid layout API to make spring animations, I didn't find a good practice.And in the example of #499 , the height of the cell is bind to a property
height
in section controller, the "data" is not modified. And in my example, the data for the cell is modified(add some extra info from server then update the cell).The text was updated successfully, but these errors were encountered: