Returns the number of touches involved in the gesture represented by the receiver.
SDKs
- iOS 10.0+
- Mac Catalyst 13.0+
- tvOS 10.0+
Framework
- UIKit
Declaration
var numberOfTouches: Int { get }
Return Value
The number of UITouch
objects in a private array maintained by the receiver. Each of these objects represents a touch in the current gesture.
Discussion
Using the value returned by this method in a loop, you can ask for the location of individual touches using the location(of
method.