Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit f902b4b

Browse files
author
Scott Goodson
committed
Replace property declaration with method overrides for -dataSource.
1 parent a0e4484 commit f902b4b

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

AsyncDisplayKit/ASPagerNode.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import <AsyncDisplayKit/ASCollectionNode.h>
1010

1111
@class ASPagerNode;
12-
@protocol ASPagerNodeDataSource
12+
@protocol ASPagerNodeDataSource <NSObject>
1313
// This method replaces -collectionView:numberOfItemsInSection:
1414
- (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode;
1515

@@ -33,7 +33,8 @@
3333
@property (weak, nonatomic) id <ASCollectionDelegate> delegate;
3434

3535
// Data Source is required, and uses a different protocol from ASCollectionNode.
36-
@property (weak, nonatomic) id <ASPagerNodeDataSource> dataSource;
36+
- (void)setDataSource:(id <ASPagerNodeDataSource>)dataSource;
37+
- (id <ASPagerNodeDataSource>)dataSource;
3738

3839
- (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated;
3940

AsyncDisplayKit/ASPagerNode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ @interface ASPagerNode () <ASCollectionDataSource, ASCollectionViewDelegateFlowL
2020
@end
2121

2222
@implementation ASPagerNode
23-
@dynamic delegate, dataSource;
23+
@dynamic delegate;
2424

2525
- (instancetype)init
2626
{

0 commit comments

Comments
 (0)