A UIView, being a UIResponder, inherits four methods corresponding to the four UITouch phases that require UIEvent delivery. A UIEvent is delivered to a view by calling one or more of these four methods (the
touchesBegan:withEvent:has left the screen.
The parameters of these methods are:
anyObject(an NSSet doesn’t implement
lastObjectbecause a set is unordered).
allTouchesmessage. This means all the event’s touches, including but not necessarily limited to those in the first parameter; there might be touches in a different phase or intended for some other view. You can call
touchesForWindow:to ask for the set of touches associated with ...