mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-15 16:36:36 +00:00
* Fixed bug in `ASEnvironmentMergeObjectAndState` * New ASLayoutSpec methods for `setChild`/`setChildren`/`setChild:forIdentifier:` have been added to take in a trait collection. * Added `setChild:`-like methods for ASLayoutSpecs take a traitCollection * Fixed instances where nodes in a data controller were not getting their trait collections * propagate traitCollection in ASDisplayNode on insertSubnode or addSubnode
32 lines
987 B
Objective-C
32 lines
987 B
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/ASLayoutSpec.h>
|
|
#import <AsyncDisplayKit/ASRelativeSize.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* A layout spec that positions children at fixed positions.
|
|
*
|
|
* Computes a size that is the union of all childrens' frames.
|
|
*/
|
|
@interface ASStaticLayoutSpec : ASLayoutSpec
|
|
|
|
/**
|
|
@param children Children to be positioned at fixed positions, each conforms to ASStaticLayoutable
|
|
*/
|
|
+ (instancetype)staticLayoutSpecWithChildren:(NSArray<id<ASStaticLayoutable>> *)children;
|
|
+ (instancetype)staticLayoutSpecWithChildren:(NSArray<id<ASStaticLayoutable>> *)children traitCollection:(nullable ASTraitCollection *)traitCollection;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|