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

Conversation

@ianolito
Copy link
Contributor

Some fixes to the placeholder API:

  • The _pendingDisplayNodes object was never initialized.
  • Placeholder opacity was not reset after being faded out once.
  • Small documentation typo.

@appleguy
Copy link
Contributor

appleguy commented May 4, 2015

Sorry for the delay! @rnystrom, do you know this code best? If not I'll take a look as soon as I can.

@appleguy
Copy link
Contributor

Thanks @ianolito, I'm going to go ahead and take this. It certainly would be better to lazily create the set because this will add a relevant amount of overhead to leaf nodes that won't display any subnodes — particularly layer-backed nodes that are otherwise quite cheap and may be numerous. If you get around to another diff to address that, awesome :).

appleguy added a commit that referenced this pull request May 22, 2015
Fix handling of pending nodes and placeholder layer
@appleguy appleguy merged commit 5d0a284 into facebookarchive:master May 22, 2015
@ianolito ianolito deleted the fix-placeholder-api branch May 23, 2015 16:04
peter-iakovlev pushed a commit to peter-iakovlev/AsyncDisplayKit that referenced this pull request Aug 4, 2017
* Minor refactors in ASCollectionView and its private cell classes
- `_ASCollectionReusableView` and `_ASCollectionViewCell` no longer expose getters for their collection element and cell node properties. This is to make sure that clients can only obtain elements from the visible map which is always the source of truth.
- Since the map can return `nil` for an element request, it's much safer to check and avoid adding/removing a nil pointer to an `NSArray`.
- Since we use a special way to check whether an object of kind of `_ASCollectionViewCell` or `_ASCollectionReusableView`, based on the assumption that these classes are subclass restricted, I added cast-or-return  macros in the header files, closer to where the restrictions are declared.

* Add ASDynamicCastStrict

* Add element and node properties back to _ASCollectionReusableView and _ASCollectionViewCell

* Assert unexpected nil elements

* Always mark an element visible even if it is backed by an UIKit / non-_ASCollection* view

* Fix typo

* Remove unnecessary changes

* Dump mistakes

* Update CHANGELOG

* Can't track visibility of elements backed by non-_AS views
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants