mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
30 lines
928 B
Plaintext
30 lines
928 B
Plaintext
//
|
|
// UICollectionViewLayout+ASConvenience.mm
|
|
// Texture
|
|
//
|
|
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
|
|
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
|
|
#import <AsyncDisplayKit/UICollectionViewLayout+ASConvenience.h>
|
|
|
|
#import <UIKit/UICollectionViewFlowLayout.h>
|
|
|
|
#import <AsyncDisplayKit/ASCollectionViewFlowLayoutInspector.h>
|
|
#import <AsyncDisplayKit/ASInternalHelpers.h>
|
|
|
|
@implementation UICollectionViewLayout (ASLayoutInspectorProviding)
|
|
|
|
- (id<ASCollectionViewLayoutInspecting>)asdk_layoutInspector
|
|
{
|
|
UICollectionViewFlowLayout *flow = AS::DynamicCast<UICollectionViewFlowLayout>(self);
|
|
if (flow != nil) {
|
|
return [[ASCollectionViewFlowLayoutInspector alloc] initWithFlowLayout:flow];
|
|
} else {
|
|
return [[ASCollectionViewLayoutInspector alloc] init];
|
|
}
|
|
}
|
|
|
|
@end
|