mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Replace property declaration with method overrides for -dataSource.
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ASPagerNode
|
@implementation ASPagerNode
|
||||||
@dynamic delegate, dataSource;
|
@dynamic delegate;
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user