Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does AppDelegate inherit from UIResponder?

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?

like image 404
ma11hew28 Avatar asked Aug 01 '11 00:08

ma11hew28


1 Answers

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.

like image 174
cahn Avatar answered Oct 10 '22 22:10

cahn