mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-01 18:33:10 +00:00
- Introduce ASLayoutNode and its subclasses. - ASDisplayNode measures its ASLayoutNode and cache the result (ASLayout). Calculated size and position of each subnode can be retrieved from the calculated layout. - Custom nodes need to override -layoutNodeThatFits:(CGSize) instead of -calculateSizeThatFits:(CGSize). - Custom nodes do not need to layout its subnodes (in -layout:) anymore. ASDisplayNode can handle the job most of the time, by walking through its layout tree. - ASCompositeNode is used to embed (display) subnodes to a node's layout. That way, each subnode will also be measured while the parent node is measuring. And the parent node knows where its subnodes are within its layout.
40 lines
1.4 KiB
Objective-C
40 lines
1.4 KiB
Objective-C
/* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <AsyncDisplayKit/ASDisplayNode.h>
|
|
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
|
|
|
|
#import <AsyncDisplayKit/ASControlNode.h>
|
|
#import <AsyncDisplayKit/ASImageNode.h>
|
|
#import <AsyncDisplayKit/ASTextNode.h>
|
|
|
|
#import <AsyncDisplayKit/ASEditableTextNode.h>
|
|
|
|
#import <AsyncDisplayKit/ASBasicImageDownloader.h>
|
|
#import <AsyncDisplayKit/ASMultiplexImageNode.h>
|
|
#import <AsyncDisplayKit/ASNetworkImageNode.h>
|
|
|
|
#import <AsyncDisplayKit/ASTableView.h>
|
|
#import <AsyncDisplayKit/ASCollectionView.h>
|
|
#import <AsyncDisplayKit/ASCellNode.h>
|
|
|
|
#import <AsyncDisplayKit/ASScrollNode.h>
|
|
|
|
#import <AsyncDisplayKit/ASLayout.h>
|
|
#import <AsyncDisplayKit/ASDimension.h>
|
|
#import <AsyncDisplayKit/ASLayoutNodeSize.h>
|
|
#import <AsyncDisplayKit/ASCompositeNode.h>
|
|
#import <AsyncDisplayKit/ASLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASBackgroundLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASCenterLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASInsetLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASOverlayLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASRatioLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASStaticLayoutNode.h>
|
|
#import <AsyncDisplayKit/ASStackLayoutNode.h>
|