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

Lost all animation(included system animation) when ASCollectionView become table header view #102

Open
garrettmoon opened this issue May 1, 2017 · 2 comments

Comments

@garrettmoon
Copy link
Member

From @tiepvuvan on August 25, 2015 9:43

I've implemented this method in my application

tableView:viewForHeaderInSection: of an ASTableView

Everything work fine if i return an UIView
But when i return a ASCollectionView as Table Header View
My app lost all animation(included system animation like Keyboard, transition...)
This issue only occur in the newest code(branch master), v1.2.3 is working fine

I've search google for this problem, i got this answer, may be helpful

Animations may get disabled for the entire app whenever an attempt is made to animate views on a background thread"

Copied from original issue: facebookarchive/AsyncDisplayKit#628

@garrettmoon
Copy link
Member Author

From @appleguy on September 8, 2015 3:48

@tiepvuvan Thank you for reporting this unusual issue! I had certainly not been aware of it.

Fortunately, I'm doing work in this area and could almost certainly fix it, if you are able to provide a small patch that can reproduce it in one of the sample apps (examples/ directory in the repo). The brand new "HorizontalWithinVerticalScrolling" sample may be a good one to try, or "Kittens".

Although we should be able to fix the issue, keep in mind that the best way to embed a collection view inside an ASTableView would be to use the ASCollectionNode that I just landed today. For now, you must access the view property to configure the asyncDelegate, asyncDataSource, on the underlying ASCollectionView (and thus, must do this on the main thread). I'm thinking about the right way to improve this API, and am interested in any suggestions you may have (no worries though, I have a plan developing).

The reason to use ASCollectionNode is that it enables much more refined preloading behavior. The nested ASCollectionNode's own working range will coordinate with the containing ASTableView's working range, carefully managing network preload and display / rendering to minimize both memory usage and user-perceived wait time.

As of today, there isn't a "header node" class for ASTableView, and I think it is best not to add one if you can achieve the desired behavior by using a cell instead. If you need "floating header" behavior and it is not relatively straightforward to implement with an overlaid view + -scrollViewDidScroll:, then I would be happy to merge a patch that supports using nodes for headers / footers (optionally, with views still supported).

@garrettmoon
Copy link
Member Author

From @hannahmbanana on June 17, 2016 22:59

@appleguy: Is this a functionality we want to support?

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

No branches or pull requests

1 participant