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

This commit is contained in:
Adlai Holler
2016-09-29 16:41:28 -04:00
committed by GitHub
parent 47f73576ef
commit f9ee1dd4b6
5 changed files with 90 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.
*/