Closed lmbcosta closed 4 years ago
Hey @lmbcosta, so Instructions is always a bit tacky when used will collections.
But what you can do is look into pausing and resuming the flow (also, have a look at this example)
You should be able to achieve what you want by pausing the flow in willShow
, scrolling to the appropriate item and resuming the flow after the scroll completed.
Hello, @ephread. Thank you for the reply. I was testing and, yes, I was able to make it work using pause/resume strategy. Consider this issue closed
I'm glad to hear that!
Question
After reading the documentation and make some tests on a sample project, I wasn't able to solve this situation:
My second CoachMarkView will be the third cell. I want to scroll to my third cell animated and then get the correct frame for this cell Currently I am trying to do something like
This only works if I pass animated argument as false:
collectionView.scrollToItem(at: .init(row: 3, section: 0), at: .centeredVertically, animated: false)
It will give me the previous position of the cell before the scroll, otherwiseI also tried scroll on other delegate functions like:
and then update on delegate function
and still not work.
Is there a way to handle this situation? The worst scenario: if collection view didn't dequeue a cell for certain indexPath. But let focus on the example
Thank you