Swiftgram/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.h
ricky 59a26ee111 [ASTraitCollection] Bug fixing/LayoutSpec propagation
* 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
2016-05-23 16:37:40 -07:00

30 lines
1.0 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/ASLayoutSpec.h>
NS_ASSUME_NONNULL_BEGIN
/**
This layout spec lays out a single layoutable child and then overlays a layoutable object on top of it streched to its size
*/
@interface ASOverlayLayoutSpec : ASLayoutSpec
@property (nullable, nonatomic, strong) id<ASLayoutable> overlay;
+ (instancetype)overlayLayoutSpecWithChild:(id<ASLayoutable>)child overlay:(nullable id<ASLayoutable>)overlay;
+ (instancetype)overlayLayoutSpecWithChild:(id<ASLayoutable>)child overlay:(nullable id<ASLayoutable>)overlay traitCollection:(nullable ASTraitCollection *)traitCollection;
- (void)setOverlay:(id<ASLayoutable> _Nullable)overlay traitCollection:(nullable ASTraitCollection *)traitCollection;
@end
NS_ASSUME_NONNULL_END