mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol. - ASDisplayNode can be embeded directly into layout graph. - Eliminate ASCompositeNode. - Fix ASStaticSizeDisplayNode not recpect min constrained size. - Updated tests.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#import <AsyncDisplayKit/ASThread.h>
|
||||
|
||||
#import <AsyncDisplayKit/ASLayout.h>
|
||||
@class ASLayoutNode;
|
||||
|
||||
/**
|
||||
* The subclass header _ASDisplayNode+Subclasses_ defines the following methods that either must or can be overriden by
|
||||
@@ -108,22 +107,6 @@
|
||||
*/
|
||||
- (void)layoutDidFinish;
|
||||
|
||||
- (ASLayoutNode *)layoutNodeThatFits:(CGSize)constrainedSize;
|
||||
|
||||
/**
|
||||
* @abstract Return the calculated layout.
|
||||
*
|
||||
* @param constrainedSize The maximum size the receiver should fit in.
|
||||
*
|
||||
* @discussion Subclasses that override should expect this method to be called on a non-main thread. The returned layout
|
||||
* is cached by ASDisplayNode for quick access during -layout, via -calculatedSize. Other expensive work that needs to
|
||||
* be done before display can be performed here, and using ivars to cache any valuable intermediate results is
|
||||
* encouraged.
|
||||
*
|
||||
* @note This method should not be called directly outside of ASDisplayNode; use -measure: or -calculatedLayout instead.
|
||||
*/
|
||||
- (ASLayout *)calculateLayoutThatFits:(CGSize)constrainedSize;
|
||||
|
||||
/**
|
||||
* @abstract Invalidate previously measured and cached layout.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user