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 UIViewitself, if it does not handle the event then it continues up the chain to until UIResponder handles the event. The chain will include UIViewControllers, parent UIViews and their associated UIViewControllers, 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:
enter image description here

Comments

Popular posts from this blog

iOS Architecture

setNeedsLayout vs layoutIfNeeded Explained

Performance Tips for IOS Application