mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASDisplayNode] Trigger a layout pass whenever a node enters preload state (#3263)
* Add a thread-safe layoutIfNeeded implementation to ASDisplayNode * Trigger a layout pass when a display node enters preload state - This ensures that all the subnodes have the correct size to preload their content. * ASCollectionNode to trigger its initial data load when it enters preload state * Minor change in _ASCollectionViewCell * Layout sublayouts before dispatch to main for subclass hooks * Update comments * Don't wait until updates are committed when the collection node enters display state * Same deal for table node * Explain the layout trigger in ASDisplayNode
This commit is contained in:
@@ -639,6 +639,11 @@ extern NSInteger const ASDefaultDrawingPriority;
|
||||
*/
|
||||
- (void)setNeedsLayout;
|
||||
|
||||
/**
|
||||
* Performs a layout pass on the node. Convenience for use whether the view / layer is loaded or not. Safe to call from a background thread.
|
||||
*/
|
||||
- (void)layoutIfNeeded;
|
||||
|
||||
@property (nonatomic, strong, nullable) id contents; // default=nil
|
||||
@property (nonatomic, assign) BOOL clipsToBounds; // default==NO
|
||||
@property (nonatomic, getter=isOpaque) BOOL opaque; // default==YES
|
||||
|
||||
Reference in New Issue
Block a user