|
19 | 19 | @protocol ASCollectionDelegate; |
20 | 20 | @protocol ASCollectionViewLayoutInspecting; |
21 | 21 |
|
| 22 | +NS_ASSUME_NONNULL_BEGIN |
| 23 | + |
22 | 24 | /** |
23 | 25 | * Node-based collection view. |
24 | 26 | * |
|
87 | 89 | * Boolean parameter that contains the value YES if all of the related animations completed successfully or |
88 | 90 | * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. |
89 | 91 | */ |
90 | | -- (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completion:(void (^)(BOOL))completion; |
| 92 | +- (void)performBatchAnimated:(BOOL)animated updates:(void (^ _Nullable)())updates completion:(void (^ _Nullable)(BOOL))completion; |
91 | 93 |
|
92 | 94 | /** |
93 | 95 | * Perform a batch of updates asynchronously. This method must be called from the main thread. |
|
98 | 100 | * Boolean parameter that contains the value YES if all of the related animations completed successfully or |
99 | 101 | * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. |
100 | 102 | */ |
101 | | -- (void)performBatchUpdates:(void (^)())updates completion:(void (^)(BOOL))completion; |
| 103 | +- (void)performBatchUpdates:(void (^ _Nullable)())updates completion:(void (^ _Nullable)(BOOL))completion; |
102 | 104 |
|
103 | 105 | /** |
104 | 106 | * Reload everything from scratch, destroying the working range and all cached nodes. |
|
107 | 109 | * the main thread. |
108 | 110 | * @warning This method is substantially more expensive than UICollectionView's version. |
109 | 111 | */ |
110 | | -- (void)reloadDataWithCompletion:(void (^)())completion; |
| 112 | +- (void)reloadDataWithCompletion:(void (^ _Nullable)())completion; |
111 | 113 |
|
112 | 114 | /** |
113 | 115 | * Reload everything from scratch, destroying the working range and all cached nodes. |
|
186 | 188 | * @discussion This method must be called from the main thread. The asyncDataSource must be updated to reflect the changes |
187 | 189 | * before this method is called. |
188 | 190 | */ |
189 | | -- (void)insertItemsAtIndexPaths:(NSArray *)indexPaths; |
| 191 | +- (void)insertItemsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths; |
190 | 192 |
|
191 | 193 | /** |
192 | 194 | * Deletes the items specified by an array of index paths. |
|
196 | 198 | * @discussion This method must be called from the main thread. The asyncDataSource must be updated to reflect the changes |
197 | 199 | * before this method is called. |
198 | 200 | */ |
199 | | -- (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths; |
| 201 | +- (void)deleteItemsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths; |
200 | 202 |
|
201 | 203 | /** |
202 | 204 | * Reloads the specified items. |
|
206 | 208 | * @discussion This method must be called from the main thread. The asyncDataSource must be updated to reflect the changes |
207 | 209 | * before this method is called. |
208 | 210 | */ |
209 | | -- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths; |
| 211 | +- (void)reloadItemsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths; |
210 | 212 |
|
211 | 213 | /** |
212 | 214 | * Moves the item at a specified location to a destination location. |
|
243 | 245 | * |
244 | 246 | * @returns an array containing the nodes being displayed on screen. |
245 | 247 | */ |
246 | | -- (NSArray *)visibleNodes; |
| 248 | +- (NSArray<ASCellNode *> *)visibleNodes; |
247 | 249 |
|
248 | 250 | /** |
249 | 251 | * Query the sized node at `indexPath` for its calculatedSize. |
|
354 | 356 | @optional |
355 | 357 |
|
356 | 358 | - (void)collectionView:(ASCollectionView *)collectionView willDisplayNodeForItemAtIndexPath:(NSIndexPath *)indexPath; |
357 | | -- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNodeForItemAtIndexPath:(NSIndexPath*)indexPath; |
| 359 | +- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNodeForItemAtIndexPath:(NSIndexPath *)indexPath; |
358 | 360 |
|
359 | 361 | /** |
360 | 362 | * Receive a message that the collectionView is near the end of its data set and more data should be fetched if |
|
423 | 425 | - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout asyncDataFetching:(BOOL)asyncDataFetchingEnabled ASDISPLAYNODE_DEPRECATED; |
424 | 426 |
|
425 | 427 | @end |
| 428 | + |
| 429 | +NS_ASSUME_NONNULL_END |
0 commit comments