PSTCollectionViewUpdateItem.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // PSTCollectionViewUpdateItem.h
  3. // PSPDFKit
  4. //
  5. // Copyright (c) 2012-2013 Peter Steinberger. All rights reserved.
  6. // Contributed by Sergey Gavrilyuk.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSInteger, PSTCollectionUpdateAction) {
  10. PSTCollectionUpdateActionInsert,
  11. PSTCollectionUpdateActionDelete,
  12. PSTCollectionUpdateActionReload,
  13. PSTCollectionUpdateActionMove,
  14. PSTCollectionUpdateActionNone
  15. };
  16. @interface PSTCollectionViewUpdateItem : NSObject
  17. @property (nonatomic, readonly, strong) NSIndexPath *indexPathBeforeUpdate; // nil for PSTCollectionUpdateActionInsert
  18. @property (nonatomic, readonly, strong) NSIndexPath *indexPathAfterUpdate; // nil for PSTCollectionUpdateActionDelete
  19. @property (nonatomic, readonly, assign) PSTCollectionUpdateAction updateAction;
  20. - (id)initWithInitialIndexPath:(NSIndexPath *)arg1
  21. finalIndexPath:(NSIndexPath *)arg2
  22. updateAction:(PSTCollectionUpdateAction)arg3;
  23. - (id)initWithAction:(PSTCollectionUpdateAction)arg1
  24. forIndexPath:(NSIndexPath *)indexPath;
  25. - (id)initWithOldIndexPath:(NSIndexPath *)arg1 newIndexPath:(NSIndexPath *)arg2;
  26. - (PSTCollectionUpdateAction)updateAction;
  27. - (NSComparisonResult)compareIndexPaths:(PSTCollectionViewUpdateItem *)otherItem;
  28. - (NSComparisonResult)inverseCompareIndexPaths:(PSTCollectionViewUpdateItem *)otherItem;
  29. @end