Why does AppDelegate inherit from UIResponder?

ma11hew28 picture ma11hew28 · Aug 1, 2011 · Viewed 8.8k times · Source

I noticed that when creating a new project with the iPhone Master-Detail template in Xcode 4.2 beta 4, it does:

// AppDelegate.h

@interface AppDelegate : UIResponder <UIApplicationDelegate>

Why does AppDelegate inherit from UIResponder instead of NSObject?

Answer

cahn picture cahn · Jul 24, 2013

From Converting to Storyboards Release Notes:

Note: In the current Xcode templates, the application delegate class inherits from UIResponder. This is so that the delegate instance can participate in the responder chain and so handle application-level actions. If you haven’t made use of this pattern in an existing application, there’s no need to adopt it for storyboards.