This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919@property (nonatomic , readonly ) ASCollectionView *view;
2020
21+ /* *
22+ * Tuning parameters for a range type.
23+ *
24+ * @param rangeType The range type to get the tuning parameters for.
25+ *
26+ * @returns A tuning parameter value for the given range type.
27+ *
28+ * Defaults to the render range having one sceenful both leading and trailing and the preload range having two
29+ * screenfuls in both directions.
30+ */
31+ - (ASRangeTuningParameters)tuningParametersForRangeType : (ASLayoutRangeType)rangeType ;
32+
33+ /* *
34+ * Set the tuning parameters for a range type.
35+ *
36+ * @param tuningParameters The tuning parameters to store for a range type.
37+ * @param rangeType The range type to set the tuning parameters for.
38+ */
39+ - (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType ;
40+
2141/* *
2242 * Reload everything from scratch, destroying the working range and all cached nodes.
2343 *
Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ - (void)clearFetchedData
4545
4646#pragma mark - ASCollectionView Forwards
4747
48+ - (ASRangeTuningParameters)tuningParametersForRangeType : (ASLayoutRangeType)rangeType
49+ {
50+ return [self .view tuningParametersForRangeType: rangeType];
51+ }
52+
53+ - (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType
54+ {
55+ return [self .view setTuningParameters: tuningParameters forRangeType: rangeType];
56+ }
57+
4858- (void )reloadDataWithCompletion : (void (^)())completion
4959{
5060 [self .view reloadDataWithCompletion: completion];
Original file line number Diff line number Diff line change 1414
1515@property (weak , nonatomic ) id <ASPagerNodeDataSource> dataSource;
1616
17- - (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType ;
18-
1917@end
2018
2119@protocol ASPagerNodeDataSource <NSObject >
Original file line number Diff line number Diff line change @@ -49,11 +49,6 @@ - (void)didLoad
4949 [self setTuningParameters: renderParams forRangeType: ASLayoutRangeTypeRender];
5050}
5151
52- - (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType
53- {
54- [self .view setTuningParameters: tuningParameters forRangeType: rangeType];
55- }
56-
5752#pragma mark - ASCollectionViewDataSource
5853
5954- (ASCellNode *)collectionView : (ASCollectionView *)collectionView nodeForItemAtIndexPath : (NSIndexPath *)indexPath
You can’t perform that action at this time.
0 commit comments