Add a block API to provide an ASLayoutSpec without having to subclass ASDisplayNode

This commit is contained in:
Michael Schneider
2016-04-20 19:16:54 -07:00
parent dd4853bf3a
commit 87a37a283e
4 changed files with 50 additions and 17 deletions

View File

@@ -143,6 +143,8 @@ NS_ASSUME_NONNULL_BEGIN
* encouraged.
*
* @note This method should not be called directly outside of ASDisplayNode; use -measure: or -calculatedLayout instead.
*
* @warning Overwriting layoutSpecThatFits: in a subclass and providing a layoutSpecBlock block is currently not supported
*/
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize;