I want to resize the collection cell by dragging its edge. What is the best possible way? Currently, I am changing the current cell width manually. but it disrupts other cells and if I invalidate layout or reloadcollection() then it cause huge memory. Please suggest some best ways to get this functionality. I am attaching the video of the functionality please check.
I have tried to do it by invalidateLayout every time or reload cell it cost me huge cpu usage and memory. Please suggest some better idea.
Add a UIPanGestureRecognizer to each collection view cell: In your custom collection view cell class, add the pan gesture recognizer in the initialization method or awakeFromNib method.
Implement the resizing logic: When the pan gesture is recognized, you need to calculate the new width of the cell and adjust its frame accordingly. Additionally, you may need to update the layout of other cells to accommodate the resized cell.