I am developing a game for iPhone with Swift 4
.
My problem is this: I have a% co_of% of 10 columns and enough rows, more than 70, so in the iPhone screen only 12 rows of the more than 70 are displayed)
We put ourselves in situation:
1.- the rows from 5 to 17 (for example) are visible in the iPhone screen
2.- the player presses one of the visible cells (or press a button on the screen)
3.- In response to that click I want the iPhone screen to move the CollectionView
so that the rows from 42 to 54 (for example) are visible on the screen
And this is my problem: I do not know how to make the "focus" of CollectionView
be positioned in the rows that I intend to see on the screen.