Add a concurrent flag to ASStackLayoutSpec that is off by default (#3148)

This commit is contained in:
Huy Nguyen
2017-03-08 16:33:50 +00:00
committed by GitHub
parent 21953c97ef
commit dd8cac4414
4 changed files with 29 additions and 17 deletions

View File

@@ -59,11 +59,14 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) ASStackLayoutJustifyContent justifyContent;
/** Orientation of children along cross axis. Defaults to ASStackLayoutAlignItemsStretch */
@property (nonatomic, assign) ASStackLayoutAlignItems alignItems;
//TODO documentation. Defaults to ASStackLayoutFlexWrapNoWrap
/** Whether children are stacked into a single or multiple lines. Defaults to single line (ASStackLayoutFlexWrapNoWrap) */
@property (nonatomic, assign) ASStackLayoutFlexWrap flexWrap;
//TODO documentation. Defaults to ASStackLayoutAlignContentStart
/** Orientation of lines along cross axis if there are multiple lines. Defaults to ASStackLayoutAlignContentStart */
@property (nonatomic, assign) ASStackLayoutAlignContent alignContent;
/** Whether this stack can dispatch to other threads, regardless of which thread it's running on */
@property (nonatomic, assign, getter=isConcurrent) BOOL concurrent;
- (instancetype)init;
/**
@@ -84,8 +87,9 @@ NS_ASSUME_NONNULL_BEGIN
@param spacing The spacing between the children
@param justifyContent If no children are flexible, this describes how to fill any extra space
@param alignItems Orientation of the children along the cross axis
@param flexWrap Whether children are stacked into a single or multiple lines
@param alignContent Orientation of lines along cross axis if there are multiple lines
@param children ASLayoutElement children to be positioned.
TODO documentation flex wrap and align content
*/
+ (instancetype)stackLayoutSpecWithDirection:(ASStackLayoutDirection)direction
spacing:(CGFloat)spacing