Implement horizontal and vertical alignments for stack layout

This commit is contained in:
Huy Nguyen
2015-11-20 17:50:05 +02:00
parent 50a52e7112
commit 0077c3eec6
11 changed files with 235 additions and 8 deletions

View File

@@ -35,10 +35,25 @@
*/
@interface ASStackLayoutSpec : ASLayoutSpec
/** Specifies the direction children are stacked in. */
/**
Specifies the direction children are stacked in. If horizontalAlignment and verticalAlignment were set,
they will be resolved again, causing justifyContent and alignItems to be updated accordingly
*/
@property (nonatomic, assign) ASStackLayoutDirection direction;
/** The amount of space between each child. */
@property (nonatomic, assign) CGFloat spacing;
/**
Specifies how children are aligned horizontally. Depends on the stack direction, setting the alignment causes either
justifyContent or alignItems to be updated. The alignment will remain valid after future direction changes.
Thus, it is preferred to those properties
*/
@property (nonatomic, assign) ASHorizontalAlignment horizontalAlignment;
/**
Specifies how children are aligned vertically. Depends on the stack direction, setting the alignment causes either
justifyContent or alignItems to be updated. The alignment will remain valid after future direction changes.
Thus, it is preferred to those properties
*/
@property (nonatomic, assign) ASVerticalAlignment verticalAlignment;
/** The amount of space between each child. */
@property (nonatomic, assign) ASStackLayoutJustifyContent justifyContent;
/** Orientation of children along cross axis */