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+ * Reload everything from scratch, destroying the working range and all cached nodes.
23+ *
24+ * @param completion block to run on completion of asynchronous loading or nil. If supplied, the block is run on
25+ * the main thread.
26+ * @warning This method is substantially more expensive than UICollectionView's version.
27+ */
28+ - (void )reloadDataWithCompletion : (void (^)())completion ;
29+
30+ /* *
31+ * Reload everything from scratch, destroying the working range and all cached nodes.
32+ *
33+ * @warning This method is substantially more expensive than UICollectionView's version.
34+ */
35+ - (void )reloadData ;
36+
37+ /* *
38+ * Reload everything from scratch entirely on the main thread, destroying the working range and all cached nodes.
39+ *
40+ * @warning This method is substantially more expensive than UICollectionView's version and will block the main thread
41+ * while all the cells load.
42+ */
43+ - (void )reloadDataImmediately ;
44+
2145@end
Original file line number Diff line number Diff line change @@ -43,4 +43,21 @@ - (void)clearFetchedData
4343 [self .view clearFetchedData ];
4444}
4545
46+ #pragma mark - ASCollectionView Forwards
47+
48+ - (void )reloadDataWithCompletion : (void (^)())completion
49+ {
50+ [self .view reloadDataWithCompletion: completion];
51+ }
52+
53+ - (void )reloadData
54+ {
55+ [self .view reloadData ];
56+ }
57+
58+ - (void )reloadDataImmediately
59+ {
60+ [self .view reloadDataImmediately ];
61+ }
62+
4663@end
Original file line number Diff line number Diff line change 1414
1515@property (weak , nonatomic ) id <ASPagerNodeDataSource> dataSource;
1616
17- - (void )reloadData ;
18-
1917- (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType ;
2018
2119@end
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 )reloadData
53- {
54- [self .view reloadData ];
55- }
56-
5752- (void )setTuningParameters : (ASRangeTuningParameters)tuningParameters forRangeType : (ASLayoutRangeType)rangeType
5853{
5954 [self .view setTuningParameters: tuningParameters forRangeType: rangeType];
You can’t perform that action at this time.
0 commit comments