I have collection view that has stepper inside the collection view cell used to increase the number of product like the image below.
I need to know, when I clic
You have the stepper because it is the sender
in your action method. The stepper has a superview which is the cell (you might have to walk up more than one superview to reach the cell). Once you have the cell you can call indexPath(for:)
to get the index path. Done.
https://developer.apple.com/documentation/uikit/uicollectionview/1618094-indexpath