[ASCellNode] Restore Layout Attributes Fix + iOS 10 Modification (#2335)

* [ASCellNode] Fix applyLayoutAttributes not called, add readonly layoutAttributes property (#2321)

* Clear cell node layout attributes in didEndDisplayingCell: also
This commit is contained in:
Adlai Holler
2016-10-05 17:31:46 -04:00
committed by GitHub
parent 3f1f5667c3
commit bb366d14f0
5 changed files with 91 additions and 1 deletions

View File

@@ -74,6 +74,15 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
*/
@property (nonatomic, assign) BOOL neverShowPlaceholders;
/*
* The layout attributes currently assigned to this node, if any.
*
* @discussion This property is useful because it is set before @c collectionView:willDisplayNode:forItemAtIndexPath:
* is called, when the node is not yet in the hierarchy and its frame cannot be converted to/from other nodes. Instead
* you can use the layout attributes object to learn where and how the cell will be displayed.
*/
@property (nonatomic, strong, readonly, nullable) UICollectionViewLayoutAttributes *layoutAttributes;
/*
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
*/