RABatchChangeEntity.h 746 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // RABatchChangesEntity.h
  3. // RATreeView
  4. //
  5. // Created by Rafal Augustyniak on 17/11/15.
  6. // Copyright © 2015 Rafal Augustyniak. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSInteger, RABatchChangeType) {
  10. RABatchChangeTypeItemRowInsertion = 0,
  11. RABatchChangeTypeItemRowExpansion,
  12. RABatchChangeTypeItemRowDeletion,
  13. RABatchChangeTypeItemRowCollapse,
  14. RABatchChangeTypeItemMove
  15. };
  16. @interface RABatchChangeEntity : NSObject
  17. @property (nonatomic) RABatchChangeType type;
  18. @property (nonatomic) NSInteger ranking;
  19. @property (nonatomic, copy) void(^updatesBlock)();
  20. + (instancetype)batchChangeEntityWithBlock:(void(^)())updates type:(RABatchChangeType)type ranking:(NSInteger)ranking;
  21. @end