I created a UICollectionView
which is horizontal and vertically. It has different UICollectionViewCells
. Everything is layouted correctly. Now I am
Let me see if I understand the problem. You are trying to zoom in on a specific cell by changing the item size, but the size of ALL the cells are changing instead of the one that was pinched?
If my understanding is correct, then I can help. Changing FlowLayout.itemSize changes the size for all cells in the collection view. If you want to set the item size of specific cells, you should override UICollectionViewDelegateFlowLayout's sizeForItemAtIndexPath. In the sizeForItemAtIndexPath method, you can check the itemAtIndexPath against the cell that was pinched and return a different size just for that cell.
The other part of your question (about the scrolling and offset) is not really clear to me. You are right that collection views are supposed to be used either horizontally or vertically but not both. Perhaps that is what causes the problem?