Add preferredSize as getter to ASLayoutElementStyle (#2427)

This commit is contained in:
Michael Schneider
2016-10-19 12:55:19 -07:00
committed by Adlai Holler
parent 67489492ee
commit 4b914f8e15
3 changed files with 34 additions and 3 deletions

View File

@@ -250,10 +250,11 @@ extern NSString * const ASLayoutElementStyleLayoutPositionProperty;
* @discussion This method is optional, but one of either preferredSize or preferredLayoutSize is required
* for nodes that either have no intrinsic content size or
* should be laid out at a different size than its intrinsic content size. For example, this property could be
* set on an ASImageNode to display at a size different from the underlying image size.
* set on an ASImageNode to display at a size different from the underlying image size.
*
* @warning Calling the getter when the size's width or height are relative will cause an assert.
*/
@property (nonatomic, assign) CGSize preferredSize;
- (CGSize)preferredSize UNAVAILABLE_ATTRIBUTE;
/**
* @abstract An optional property that provides a minimum size bound for a layout element. If provided, this restriction will