What is the Responder Chain?
When an event happens in a view, for example a touch event, the view will fire the event to a chain of
UIResponder
objects associated with the UIView
. The first UIResponder
is the UIView
itself, if it does not handle the event then it continues up the chain to until UIResponder
handles the event. The chain will include UIViewController
s, parent UIView
s and their associated UIViewController
s, if none of those handle the event then the UIWindow
is asked if it can handle it and finally if that doesn't handle the event then the UIApplicationDelegate
is asked.
If you get the opportunity to draw this one out, it's worth doing to impress the interviewer:
Comments
Post a Comment