Responder chain

An application can handle different kind of events thanks to responder objects. These objects implement specific methods that are useful to respond to one or more events. The UIResponder class is the base class where an interface for these events is defined; therefore, most of the classes that are directly exposed to user interaction are subclasses of UIResponder, such as UIView, UIViewController, UIControl, and even the UIApplication class.

A touch event is propagated through the application structure following an explicit path: the event is generated by the system and added into the event queue; the UIApplication singleton gets the topmost event and propagates it to the key window that, in turn, identifies the view where the touch ...

Get Learning iOS UI Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.