Replace property declaration with method overrides for -dataSource.

This commit is contained in:
Scott Goodson
2015-12-24 22:47:54 -08:00
parent a0e4484ef7
commit f902b4bdc7
2 changed files with 4 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
#import <AsyncDisplayKit/ASCollectionNode.h> #import <AsyncDisplayKit/ASCollectionNode.h>
@class ASPagerNode; @class ASPagerNode;
@protocol ASPagerNodeDataSource @protocol ASPagerNodeDataSource <NSObject>
// This method replaces -collectionView:numberOfItemsInSection: // This method replaces -collectionView:numberOfItemsInSection:
- (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode; - (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode;
@@ -33,7 +33,8 @@
@property (weak, nonatomic) id <ASCollectionDelegate> delegate; @property (weak, nonatomic) id <ASCollectionDelegate> delegate;
// Data Source is required, and uses a different protocol from ASCollectionNode. // Data Source is required, and uses a different protocol from ASCollectionNode.
@property (weak, nonatomic) id <ASPagerNodeDataSource> dataSource; - (void)setDataSource:(id <ASPagerNodeDataSource>)dataSource;
- (id <ASPagerNodeDataSource>)dataSource;
- (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated; - (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated;

View File

@@ -20,7 +20,7 @@
@end @end
@implementation ASPagerNode @implementation ASPagerNode
@dynamic delegate, dataSource; @dynamic delegate;
- (instancetype)init - (instancetype)init
{ {