iOS render stack and soon

This commit is contained in:
pengfei.zhou
2019-07-31 17:43:26 +08:00
parent 674335324b
commit b0e34a316b
14 changed files with 284 additions and 85 deletions

View File

@@ -23,7 +23,7 @@ typedef NS_ENUM(NSInteger,DoricGravity) {
};
typedef NS_ENUM(NSInteger,DoricLayoutDesc) {
LAYOUT_DEFAULT = 0,
LAYOUT_ABSOLUTE = 0,
LAYOUT_MATCH_PARENT = -1,
LAYOUT_WRAP_CONTENT = -2,
};
@@ -42,10 +42,22 @@ NS_ASSUME_NONNULL_BEGIN
@interface LayoutParams : NSObject
@property (nonatomic) DoricLayoutDesc width;
@property (nonatomic) DoricLayoutDesc height;
@property (nonatomic) DoricGravity alignment;
@end
@interface MarginLayoutParams : LayoutParams
@property (nonatomic,strong) DoricRect *margin;
@end
@interface StackLayoutParams : LayoutParams
@property (nonatomic) DoricGravity alignment;
@end
@interface VHLayoutParams : MarginLayoutParams
@property (nonatomic) DoricGravity alignment;
@property (nonatomic) NSInteger weight;
@end
@interface UIView(DoricContainer)
@property (nonatomic,strong) LayoutParams *layoutParams;