location(in:)
Returns the location of the touch that started the interaction.
Declaration
func location(in coordinateSpace: (any UICoordinateSpace)?) -> CGPointParameters
- coordinateSpace:
The coordinate space in which the touch location should be returned.
Return Value
The CGPoint that represents the current location of the touch, translated into the requested coordinate space.
Discussion
Use this method to establish the current location of the touch that triggered the preview interaction.
When the preview interaction isn’t running, calling this method returns an invalid point. You must therefore only call this method in response to one of the delegate callbacks specified in UIPreviewInteractionDelegate.