mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Introduce type property to replace layout id check
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
@class ASLayout;
|
||||
@class ASLayoutSpec;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, ASLayoutableType) {
|
||||
ASLayoutableTypeLayoutSpec,
|
||||
ASLayoutableTypeDisplayNode
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
@@ -41,6 +46,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@protocol ASLayoutable <ASEnvironment, ASStackLayoutable, ASStaticLayoutable, ASLayoutablePrivate, ASLayoutableExtensibility>
|
||||
|
||||
@property (nonatomic, readonly) ASLayoutableType layoutableType;
|
||||
|
||||
/**
|
||||
* @abstract Calculate a layout based on given size range.
|
||||
*
|
||||
@@ -50,7 +57,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize;
|
||||
|
||||
|
||||
#pragma mark - Layout options from the Layoutable Protocols
|
||||
|
||||
#pragma mark - ASStackLayoutable
|
||||
|
||||
Reference in New Issue
Block a user