Swiftgram/AsyncDisplayKit/Private/ASCollectionInteropProtocols.h
Adlai Holler 38aac9d019 IGListKit Support II: Electric Boogaloo (#2942)
* Reimplement IGListKit support in a cleaner way

* Rename and fix some stuff

* Fix supplementaries more

* Update docs

* Update test

* Cleanup minor things

* Tweak it

* Indentation

* Remove irrelevant changes

* Break out cell into its own file

* Fix indentation

* Address feedback
2017-01-30 11:16:59 -08:00

35 lines
1.1 KiB
Objective-C

//
// ASCollectionDataSourceInterop.h
// AsyncDisplayKit
//
// Created by Adlai Holler on 1/20/17.
// Copyright © 2017 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/AsyncDisplayKit.h>
NS_ASSUME_NONNULL_BEGIN
/**
* Protocols that allow the data source/delegate extra hooks,
* to facilitate interop e.g. with IGListKit.
*/
@protocol ASCollectionDataSourceInterop <ASCollectionDataSource>
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
@end
@protocol ASCollectionDelegateInterop <ASCollectionDelegate>
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath;
@end
NS_ASSUME_NONNULL_END