mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add support for multiple children to ASWrapperLayoutSpec (#2469)
This commit is contained in:
committed by
GitHub
parent
97e23776e4
commit
4e580b96dc
@@ -63,19 +63,31 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
/**
|
||||
* An ASLayoutSpec subclass that can wrap a ASLayoutElement and calculates the layout of the child.
|
||||
* An ASLayoutSpec subclass that can wrap one or more ASLayoutElement and calculates the layout based on the
|
||||
* sizes of the children. If multiple children are provided the size of the biggest child will be used to for
|
||||
* size of this layout spec.
|
||||
*/
|
||||
@interface ASWrapperLayoutSpec : ASLayoutSpec
|
||||
|
||||
/*
|
||||
* Returns an ASWrapperLayoutSpec object with the given layoutElement as child
|
||||
* Returns an ASWrapperLayoutSpec object with the given layoutElement as child.
|
||||
*/
|
||||
+ (instancetype)wrapperWithLayoutElement:(id<ASLayoutElement>)layoutElement AS_WARN_UNUSED_RESULT;
|
||||
|
||||
/*
|
||||
* Returns an ASWrapperLayoutSpec object initialized with the given layoutElement as child
|
||||
* Returns an ASWrapperLayoutSpec object with the given layoutElements as children.
|
||||
*/
|
||||
- (instancetype)initWithLayoutElement:(id<ASLayoutElement>)layoutElement NS_DESIGNATED_INITIALIZER;
|
||||
+ (instancetype)wrapperWithLayoutElements:(NSArray<id<ASLayoutElement>> *)layoutElements AS_WARN_UNUSED_RESULT;
|
||||
|
||||
/*
|
||||
* Returns an ASWrapperLayoutSpec object initialized with the given layoutElement as child.
|
||||
*/
|
||||
- (instancetype)initWithLayoutElement:(id<ASLayoutElement>)layoutElement AS_WARN_UNUSED_RESULT;
|
||||
|
||||
/*
|
||||
* Returns an ASWrapperLayoutSpec object initialized with the given layoutElements as children.
|
||||
*/
|
||||
- (instancetype)initWithLayoutElements:(NSArray<id<ASLayoutElement>> *)layoutElements AS_WARN_UNUSED_RESULT;
|
||||
|
||||
/*
|
||||
* Init not available for ASWrapperLayoutSpec
|
||||
|
||||
Reference in New Issue
Block a user