Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

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

Closed
tiepvuvan opened this issue Aug 25, 2015 · 3 comments

Comments

@tiepvuvan
Copy link

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"

@appleguy
Copy link
Contributor

appleguy commented Sep 8, 2015

@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).

@hannahmbanana
Copy link
Contributor

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

@garrettmoon
Copy link
Contributor

This issue was moved to TextureGroup/Texture#102

peter-iakovlev pushed a commit to peter-iakovlev/AsyncDisplayKit that referenced this issue Jan 9, 2018
…#628)

* introducing tests for the ASTabBarController

* Update ASTabBarControllerTests.m
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants