mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Support editing in table view and collection view
This commit is contained in:
42
AsyncDisplayKit/Details/ASLayoutController.h
Normal file
42
AsyncDisplayKit/Details/ASLayoutController.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef struct {
|
||||
CGFloat leadingBufferScreenfuls;
|
||||
CGFloat trailingBufferScreenfuls;
|
||||
} ASRangeTuningParameters;
|
||||
|
||||
typedef NS_ENUM(NSInteger, ASScrollDirection) {
|
||||
ASScrollDirectionNone,
|
||||
ASScrollDirectionRight,
|
||||
ASScrollDirectionLeft,
|
||||
ASScrollDirectionUp,
|
||||
ASScrollDirectionDown,
|
||||
};
|
||||
|
||||
@protocol ASLayoutController <NSObject>
|
||||
|
||||
/**
|
||||
* Tuning parameters for the working range.
|
||||
*
|
||||
* Defaults to a trailing buffer of one screenful and a leading buffer of two screenfuls.
|
||||
*/
|
||||
@property (nonatomic, assign) ASRangeTuningParameters tuningParameters;
|
||||
|
||||
- (void)insertNodesAtIndexPaths:(NSArray *)indexPaths withSizes:(NSArray *)nodeSizes;
|
||||
|
||||
- (void)deleteNodesAtIndexPaths:(NSArray *)indexPaths;
|
||||
|
||||
- (void)insertSectionsAtIndexSet:(NSIndexSet *)indexSet;
|
||||
|
||||
- (void)deleteSectionsAtIndexSet:(NSIndexSet *)indexSet;
|
||||
|
||||
- (void)setVisibleNodeIndexPaths:(NSArray *)indexPaths;
|
||||
|
||||
- (BOOL)shouldUpdateWorkingRangesForVisibleIndexPath:(NSArray *)indexPath
|
||||
viewportSize:(CGSize)viewportSize;
|
||||
|
||||
- (NSSet *)workingRangeIndexPathsForScrolling:(enum ASScrollDirection)scrollDirection
|
||||
viewportSize:(CGSize)viewportSize;
|
||||
@end
|
||||
Reference in New Issue
Block a user