mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-08 13:42:51 +00:00
46 lines
1.5 KiB
Objective-C
46 lines
1.5 KiB
Objective-C
//
|
|
// ASCollectionNode.h
|
|
// AsyncDisplayKit
|
|
//
|
|
// Created by Scott Goodson on 9/5/15.
|
|
// Copyright (c) 2015 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import <AsyncDisplayKit/ASCollectionView.h>
|
|
|
|
/**
|
|
* ASCollectionNode is a node based class that wraps an ASCollectionView. It can be used
|
|
* as a subnode of another node, and provide room for many (great) features and improvements later on.
|
|
*/
|
|
@interface ASCollectionNode : ASDisplayNode
|
|
|
|
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout NS_DESIGNATED_INITIALIZER;
|
|
|
|
@property (nonatomic, readonly) ASCollectionView *view;
|
|
|
|
/**
|
|
* Reload everything from scratch, destroying the working range and all cached nodes.
|
|
*
|
|
* @param completion block to run on completion of asynchronous loading or nil. If supplied, the block is run on
|
|
* the main thread.
|
|
* @warning This method is substantially more expensive than UICollectionView's version.
|
|
*/
|
|
- (void)reloadDataWithCompletion:(void (^)())completion;
|
|
|
|
/**
|
|
* Reload everything from scratch, destroying the working range and all cached nodes.
|
|
*
|
|
* @warning This method is substantially more expensive than UICollectionView's version.
|
|
*/
|
|
- (void)reloadData;
|
|
|
|
/**
|
|
* Reload everything from scratch entirely on the main thread, destroying the working range and all cached nodes.
|
|
*
|
|
* @warning This method is substantially more expensive than UICollectionView's version and will block the main thread
|
|
* while all the cells load.
|
|
*/
|
|
- (void)reloadDataImmediately;
|
|
|
|
@end
|