Support editing in table view and collection view

This commit is contained in:
Li Tan
2014-12-15 13:18:14 -08:00
parent 5cb261bbd1
commit f7f5988fcd
23 changed files with 1473 additions and 891 deletions

View 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