mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Add tuning params method forwards to ASCollectionNode
This commit is contained in:
@@ -18,6 +18,26 @@
|
|||||||
|
|
||||||
@property (nonatomic, readonly) ASCollectionView *view;
|
@property (nonatomic, readonly) ASCollectionView *view;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tuning parameters for a range type.
|
||||||
|
*
|
||||||
|
* @param rangeType The range type to get the tuning parameters for.
|
||||||
|
*
|
||||||
|
* @returns A tuning parameter value for the given range type.
|
||||||
|
*
|
||||||
|
* Defaults to the render range having one sceenful both leading and trailing and the preload range having two
|
||||||
|
* screenfuls in both directions.
|
||||||
|
*/
|
||||||
|
- (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the tuning parameters for a range type.
|
||||||
|
*
|
||||||
|
* @param tuningParameters The tuning parameters to store for a range type.
|
||||||
|
* @param rangeType The range type to set the tuning parameters for.
|
||||||
|
*/
|
||||||
|
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload everything from scratch, destroying the working range and all cached nodes.
|
* Reload everything from scratch, destroying the working range and all cached nodes.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -45,6 +45,16 @@
|
|||||||
|
|
||||||
#pragma mark - ASCollectionView Forwards
|
#pragma mark - ASCollectionView Forwards
|
||||||
|
|
||||||
|
- (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType
|
||||||
|
{
|
||||||
|
return [self.view tuningParametersForRangeType:rangeType];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
||||||
|
{
|
||||||
|
return [self.view setTuningParameters:tuningParameters forRangeType:rangeType];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)reloadDataWithCompletion:(void (^)())completion
|
- (void)reloadDataWithCompletion:(void (^)())completion
|
||||||
{
|
{
|
||||||
[self.view reloadDataWithCompletion:completion];
|
[self.view reloadDataWithCompletion:completion];
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
@property (weak, nonatomic) id<ASPagerNodeDataSource> dataSource;
|
@property (weak, nonatomic) id<ASPagerNodeDataSource> dataSource;
|
||||||
|
|
||||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@protocol ASPagerNodeDataSource <NSObject>
|
@protocol ASPagerNodeDataSource <NSObject>
|
||||||
|
|||||||
@@ -49,11 +49,6 @@
|
|||||||
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
|
||||||
{
|
|
||||||
[self.view setTuningParameters:tuningParameters forRangeType:rangeType];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - ASCollectionViewDataSource
|
#pragma mark - ASCollectionViewDataSource
|
||||||
|
|
||||||
- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForItemAtIndexPath:(NSIndexPath *)indexPath
|
- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
|
|||||||
Reference in New Issue
Block a user