mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge remote-tracking branch 'upstream/master' into baseline
# Conflicts: # AsyncDisplayKit/Layout/ASLayoutSpec.h # AsyncDisplayKit/Layout/ASStackLayoutSpec.mm
This commit is contained in:
@@ -11,16 +11,6 @@
|
||||
#import <AsyncDisplayKit/ASLayoutSpec.h>
|
||||
#import <AsyncDisplayKit/ASStackLayoutDefines.h>
|
||||
|
||||
typedef struct {
|
||||
/** Specifies the direction children are stacked in. */
|
||||
ASStackLayoutDirection direction;
|
||||
/** The amount of space between each child. */
|
||||
CGFloat spacing;
|
||||
/** How children are aligned if there are no flexible children. */
|
||||
ASStackLayoutJustifyContent justifyContent;
|
||||
/** Orientation of children along cross axis */
|
||||
ASStackLayoutAlignItems alignItems;
|
||||
} ASStackLayoutSpecStyle;
|
||||
|
||||
/**
|
||||
A simple layout spec that stacks a list of children vertically or horizontally.
|
||||
@@ -45,10 +35,27 @@ typedef struct {
|
||||
*/
|
||||
@interface ASStackLayoutSpec : ASLayoutSpec
|
||||
|
||||
/** Specifies the direction children are stacked in. */
|
||||
@property (nonatomic, assign) ASStackLayoutDirection direction;
|
||||
/** The amount of space between each child. */
|
||||
@property (nonatomic, assign) CGFloat spacing;
|
||||
/** The amount of space between each child. */
|
||||
@property (nonatomic, assign) ASStackLayoutJustifyContent justifyContent;
|
||||
/** Orientation of children along cross axis */
|
||||
@property (nonatomic, assign) ASStackLayoutAlignItems alignItems;
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
@param style Specifies how children are laid out.
|
||||
@param direction The direction of the stack view (horizontal or vertical)
|
||||
@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 children ASLayoutable children to be positioned.
|
||||
*/
|
||||
+ (instancetype)newWithStyle:(ASStackLayoutSpecStyle)style children:(NSArray *)children;
|
||||
+ (instancetype)stackLayoutSpecWithDirection:(ASStackLayoutDirection)direction spacing:(CGFloat)spacing justifyContent:(ASStackLayoutJustifyContent)justifyContent alignItems:(ASStackLayoutAlignItems)alignItems children:(NSArray *)children;
|
||||
|
||||
- (void)addChild:(id<ASStackLayoutable>)child;
|
||||
- (void)addChildren:(NSArray *)children;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user