translation(in:)
Returns the scroll displacement in the coordinate system of the view that the update represents.
Declaration
func translation(in view: UIView?) -> CGPointParameters
- view:
The view that contains the coordinate system to express the displacement. Pass
nilto get the displacement in the window’s coordinate system.
Return Value
The scroll displacement of the update in the specified view’s coordinate system.
Discussion
A nonzero x or y value in the returned point indicates a displacement large enough to produce a visible change along that axis.