0

I was wondering if it is possible at all to pin a specific UICollectionViewCell to a specific location in the collection view. I have a use case for my app where there will always be at least 8 cells, and cell 7 has specific information that needs to stay there per the requirement. However, I also need to support the reordering of the other cells. I managed to get the cell to not be draggable and not move by itself, but if I drag cell 8 to location 5 for example, the cell will move. Is this even possible? What other info can I provide? I'm using LXReordableCollectionViewFlowLayout to manage the layout.

Thanks,

Ahmad
  • 315
  • 3
  • 16

1 Answers1

0

Well, I figured out the answer.

When I was moving the other cells, I was using deleteItemsAtIndexPaths and insertItemsAtIndexPaths inside a performBatchUpdates block. Right before those calls(also inside the block), I now call moveItemAtIndexPath:ToIndexPath passing in the index path of the tile that I want to hold in place for both parameters, and that keeps it in place.

Ahmad
  • 315
  • 3
  • 16