ASCollectionViewLayoutFacilitatorProtocol.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // ASCollectionViewLayoutFacilitatorProtocol.h
  3. // AsyncDisplayKit
  4. //
  5. // Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  6. // This source code is licensed under the BSD-style license found in the
  7. // LICENSE file in the root directory of this source tree. An additional grant
  8. // of patent rights can be found in the PATENTS file in the same directory.
  9. //
  10. #pragma once
  11. #import <Foundation/Foundation.h>
  12. /**
  13. * This facilitator protocol is intended to help Layout to better
  14. * gel with the CollectionView
  15. */
  16. @protocol ASCollectionViewLayoutFacilitatorProtocol <NSObject>
  17. /**
  18. * Inform that the collectionView is editing the cells at a list of indexPaths
  19. *
  20. * @param indexPaths an array of NSIndexPath objects of cells being/will be edited.
  21. * @param isBatched indicates whether the editing operation will be batched by the collectionView
  22. *
  23. * NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
  24. */
  25. - (void)collectionViewWillEditCellsAtIndexPaths:(NSArray *)indexPaths batched:(BOOL)isBatched;
  26. /**
  27. * Inform that the collectionView is editing the sections at a set of indexes
  28. *
  29. * @param indexes an NSIndexSet of section indexes being/will be edited.
  30. * @param batched indicates whether the editing operation will be batched by the collectionView
  31. *
  32. * NOTE: when batched, used in combination with -collectionViewWillPerformBatchUpdates
  33. */
  34. - (void)collectionViewWillEditSectionsAtIndexSet:(NSIndexSet *)indexes batched:(BOOL)batched;
  35. /**
  36. * Informs the delegate that the collectionView is about to call performBatchUpdates
  37. */
  38. - (void)collectionViewWillPerformBatchUpdates;
  39. @end