mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Move ASLayout frame to a computed property
This commit is contained in:
@@ -68,6 +68,12 @@ extern BOOL CGPointIsNull(CGPoint point);
|
|||||||
*/
|
*/
|
||||||
@property (nonatomic, readonly, getter=isFlattened) BOOL flattened;
|
@property (nonatomic, readonly, getter=isFlattened) BOOL flattened;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @abstract Returns a valid frame for the current layout computed with the size and position.
|
||||||
|
* @discussion Clamps the layout's origin or position to 0 if any of the calculated values are infinite.
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) CGRect frame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializer.
|
* Initializer.
|
||||||
*
|
*
|
||||||
@@ -142,12 +148,6 @@ extern BOOL CGPointIsNull(CGPoint point);
|
|||||||
*/
|
*/
|
||||||
- (ASLayout *)flattenedLayoutUsingPredicateBlock:(BOOL (^)(ASLayout *evaluatedLayout))predicateBlock;
|
- (ASLayout *)flattenedLayoutUsingPredicateBlock:(BOOL (^)(ASLayout *evaluatedLayout))predicateBlock;
|
||||||
|
|
||||||
/**
|
|
||||||
* @abstract Returns a valid frame for the current layout computed with the size and position.
|
|
||||||
* @discussion Clamps the layout's origin or position to 0 if any of the calculated values are infinite.
|
|
||||||
*/
|
|
||||||
- (CGRect)frame;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ extern BOOL CGPointIsNull(CGPoint point)
|
|||||||
|
|
||||||
@implementation ASLayout
|
@implementation ASLayout
|
||||||
|
|
||||||
|
@dynamic frame;
|
||||||
|
|
||||||
+ (instancetype)layoutWithLayoutableObject:(id<ASLayoutable>)layoutableObject
|
+ (instancetype)layoutWithLayoutableObject:(id<ASLayoutable>)layoutableObject
|
||||||
constrainedSizeRange:(ASSizeRange)sizeRange
|
constrainedSizeRange:(ASSizeRange)sizeRange
|
||||||
size:(CGSize)size
|
size:(CGSize)size
|
||||||
|
|||||||
Reference in New Issue
Block a user