Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove References to IGListSectionType, Now that It's Gone #49

Merged
merged 3 commits into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## master

* Add your own contributions to the next release on the line below this with your name.
Fix `__has_include` check in ASLog.h [Philipp Smorygo]([email protected])
Fix potential deadlock in ASControlNode [Garrett Moon](https://github.com/garrettmoon)
- Add support for IGListKit post-removal-of-IGListSectionType, in preparation for IGListKit 3.0.0 release. (Adlai-Holler)[https://github.com/Adlai-Holler] (#49)[https://github.com/TextureGroup/Texture/pull/49]
- Fix `__has_include` check in ASLog.h [Philipp Smorygo]([email protected])
- Fix potential deadlock in ASControlNode [Garrett Moon](https://github.com/garrettmoon)
2 changes: 1 addition & 1 deletion Source/ASSectionController.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN

/**
* A protocol that your section controllers should conform to,
* in addition to IGListSectionType, in order to be used with AsyncDisplayKit.
* in order to be used with AsyncDisplayKit.
*
* @note Your supplementary view source should conform to @c ASSupplementaryNodeSource.
*/
Expand Down
4 changes: 2 additions & 2 deletions Source/AsyncDisplayKit+IGListKitMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ AS_SUBCLASSING_RESTRICTED
/**
* Call this for your section controller's @c cellForItemAtIndex: method.
*/
+ (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index sectionController:(IGListSectionController<IGListSectionType> *)sectionController;
+ (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index sectionController:(IGListSectionController *)sectionController;

/**
* Call this for your section controller's @c sizeForItemAtIndex: method.
Expand All @@ -58,7 +58,7 @@ AS_SUBCLASSING_RESTRICTED
*/
+ (__kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(NSString *)elementKind
atIndex:(NSInteger)index
sectionController:(IGListSectionController<IGListSectionType> *)sectionController;
sectionController:(IGListSectionController *)sectionController;

/**
* Call this for your supplementary source's @c sizeForSupplementaryViewOfKind:atIndex: method.
Expand Down
9 changes: 5 additions & 4 deletions Source/AsyncDisplayKit+IGListKitMethods.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

@implementation ASIGListSectionControllerMethods

+ (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index sectionController:(IGListSectionController<IGListSectionType> *)sectionController
+ (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index sectionController:(IGListSectionController *)sectionController
{
return [sectionController.collectionContext dequeueReusableCellOfClass:[_ASCollectionViewCell class] forSectionController:sectionController atIndex:index];
// Cast to id for backwards-compatibility until 3.0.0 is officially released – IGListSectionType was removed. This is safe.
return [sectionController.collectionContext dequeueReusableCellOfClass:[_ASCollectionViewCell class] forSectionController:(id)sectionController atIndex:index];
}

+ (CGSize)sizeForItemAtIndex:(NSInteger)index
Expand All @@ -44,9 +45,9 @@ @implementation ASIGListSupplementaryViewSourceMethods

+ (__kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(NSString *)elementKind
atIndex:(NSInteger)index
sectionController:(IGListSectionController<IGListSectionType> *)sectionController
sectionController:(IGListSectionController *)sectionController
{
return [sectionController.collectionContext dequeueReusableSupplementaryViewOfKind:elementKind forSectionController:sectionController class:[_ASCollectionReusableView class] atIndex:index];
return [sectionController.collectionContext dequeueReusableSupplementaryViewOfKind:elementKind forSectionController:(id)sectionController class:[_ASCollectionReusableView class] atIndex:index];
}

+ (CGSize)sizeForSupplementaryViewOfKind:(NSString *)elementKind atIndex:(NSInteger)index
Expand Down
2 changes: 1 addition & 1 deletion Source/Private/ASIGListAdapterBasedDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#import <AsyncDisplayKit/AsyncDisplayKit.h>
#import <objc/runtime.h>

typedef IGListSectionController<IGListSectionType, ASSectionController> ASIGSectionController;
typedef IGListSectionController<ASSectionController> ASIGSectionController;

/// The optional methods that a class implements from ASSectionController.
/// Note: Bitfields are not supported by NSValue so we can't use them.
Expand Down