I have few cells in my collection view, now I deleted the first cell or last cell. After deleting I'm reloading the collection view, here the next cell or previous cell (first or last based on deletion) was not horizontally centered aligned. If user scroll the content then only the cell alignment is adjusting. I tried to move programatically by using setContentOffset, scrollToItem, scrollToRect but none of them worked. First and second screenshots were related to the issue after collection view reload due to deletion of first and last record respectively. The last/third screenshot belongs to expected layout, which got if user swipes on the screen
I have few cells in my collection view, now I deleted the first cell or last cell. After deleting I'm reloading the collection view, here the next cell or previous cell (first or last based on deletion) was not horizontally centered aligned. If user scroll the content then only the cell alignment is adjusting. I tried to move programatically by using setContentOffset, scrollToItem, scrollToRect but none of them worked. First and second screenshots were related to the issue after collection view reload due to deletion of first and last record respectively. The last/third screenshot belongs to expected layout, which got if user swipes on the screen
After reload when first item deleted:![Simulator Screen Shot - iPhone 11 - 2021-09-29 at 14 01 06](https://user-images.githubusercontent.com/31875244/135234621-02cf7996-8bf9-454b-9429-d6ada22241b1.png)
After reload when last item deleted:![Simulator Screen Shot - iPhone 11 - 2021-09-29 at 14 04 22](https://user-images.githubusercontent.com/31875244/135234626-650a587e-598c-4148-890b-2c7662ee5f24.png)
After user move the screen:![Simulator Screen Shot - iPhone 11 - 2021-09-29 at 13 58 11](https://user-images.githubusercontent.com/31875244/135235292-6dbe8fee-6f6f-494d-b5a6-fb651eeac567.png)