touchesShouldBegin(_:with:in:)
Overridden by subclasses to customize the default behavior when a finger touches down in displayed content.
Declaration
func touchesShouldBegin(_ touches: Set<UITouch>, with event: UIEvent?, in view: UIView) -> BoolParameters
- touches:
A set of Uitouch instances that represent the touches for the starting phase of the event represented by
event. - event:
An object representing the event to which the touch objects in
touchesbelong. - view:
The subview in the content where the touch-down gesture occurred.
Return Value
Return false if you don’t want the scroll view to send event messages to view. If you want view to receive those messages, return true (the default).
Discussion
The default behavior of UIScrollView is to invoke the UIResponder event-handling methods of the target subview that the touches occur in.