mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-02 18:59:51 +00:00
* Need to check availability before use of macros. * Get rid of PCH and enforce macro definition. * Remove prefix * Switch to global warning instead, much better.
50 lines
1.7 KiB
Objective-C
50 lines
1.7 KiB
Objective-C
//
|
|
// AsyncDisplayKit+IGListKitMethods.m
|
|
// AsyncDisplayKit
|
|
//
|
|
// Created by Adlai Holler on 2/27/17.
|
|
// Copyright © 2017 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import <AsyncDisplayKit/ASAvailability.h>
|
|
|
|
#if AS_IG_LIST_KIT
|
|
|
|
#import "AsyncDisplayKit+IGListKitMethods.h"
|
|
#import <AsyncDisplayKit/ASAssert.h>
|
|
#import <AsyncDisplayKit/_ASCollectionViewCell.h>
|
|
|
|
@implementation ASIGListSectionControllerMethods
|
|
|
|
+ (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index sectionController:(IGListSectionController<IGListSectionType> *)sectionController
|
|
{
|
|
return [sectionController.collectionContext dequeueReusableCellOfClass:[_ASCollectionViewCell class] forSectionController:sectionController atIndex:index];
|
|
}
|
|
|
|
+ (CGSize)sizeForItemAtIndex:(NSInteger)index
|
|
{
|
|
ASDisplayNodeFailAssert(@"Did not expect %@ to be called.", NSStringFromSelector(_cmd));
|
|
return CGSizeZero;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation ASIGListSupplementaryViewSourceMethods
|
|
|
|
+ (__kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(NSString *)elementKind
|
|
atIndex:(NSInteger)index
|
|
sectionController:(IGListSectionController<IGListSectionType> *)sectionController
|
|
{
|
|
return [sectionController.collectionContext dequeueReusableSupplementaryViewOfKind:elementKind forSectionController:sectionController class:[UICollectionReusableView class] atIndex:index];
|
|
}
|
|
|
|
+ (CGSize)sizeForSupplementaryViewOfKind:(NSString *)elementKind atIndex:(NSInteger)index
|
|
{
|
|
ASDisplayNodeFailAssert(@"Did not expect %@ to be called.", NSStringFromSelector(_cmd));
|
|
return CGSizeZero;
|
|
}
|
|
|
|
@end
|
|
|
|
#endif // AS_IG_LIST_KIT
|