The previous code used either a `@property` with `assign, nonatomic` semantics, or a `__unsafe_unretained` (non-atomic) ivar pointer to an instance for `asyncdisplaykit_node`.
This commit changes those access so that they have the equivalent of `weak, atomic` semantics.
- `_ASDisplayView.mm`
- Removes the `_node` ivar that was qualified with `__unsafe_unretained`.
- Removes `@synthesize asyncdisplaykit_node = _node;`.
- All direct uses of `_node` were replaced with:
- Creates a strong reference via `ASDisplayNode *node = _asyncdisplaykit_node;`.
- `s/_node/node/`.
- These changes were made even if there's a single use of `_asyncdisplaykit_node` as a consistency / defensive measure so that anyone editing this code in the future does not accidentally use a `weak` reference twice.
- `ASDisplayNode.mm`
- Getters and setters for `asyncdisplaykit_node` were changed from `nonatomic, assign` semantics to the equivalent of `atomic, weak` semantics.
- `weak` semantics were implemented by using a `ASWeakProxy` object.
- `objc_setAssociatedObject` was changed from `OBJC_ASSOCIATION_ASSIGN` to `OBJC_ASSOCIATION_RETAIN` (the `atomic` version of retain).
- `ASDisplayNode+FrameworkPrivate.h`
- Changed the `@property` declarations for `asyncdisplaykit_node` from `nonatomic, assign` to `atomic, weak`.
- The actual getters and setters are implemented in `ASDisplayNode.mm`, which were changed accordingly.
* Perhaps controversially, decomposing ASRangeControllerUpdateRangeProtocol+Beta.h such that the categories on various classes are defined in the classes themselves since that's where the implementation of those categories is provided.
* Updating unit tests and import other headers the tests took for granted. The tests could probably import the umbrella header and not have to worry about this.
* Updating the "Life without Cocoapods" sample to build and run dependent on ASDK as a static library.
* Added a "Life With Frameworks" sample app to build and run dependent on ASDK as a framework, proving the framework targets work.
- Only update range mode if visibility changes if the node is not range controlled
- Only change explicitly set range mode if ASRangeController becomes visible
- Return interface state for range controller in ASCollectionView and ASTableView based on if the containing node is range managed
Before, it was expensive to check this value, even though it was rarely set.
Now the cost is moved to setting the value, and is made very cheap to check with _hierarchyState.