iPhone first responders

Posted by William Jockusch on Stack Overflow See other posts from Stack Overflow or by William Jockusch
Published on 2010-04-10T03:40:57Z Indexed on 2010/04/10 3:43 UTC
Read the original article Hit count: 754

Filed under:
|

I am confused about the iPhone responder chain. Specifically, in the iPhone event handling guide http://developer.apple.com/iPhone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/EventHandling/EventHandling.html, we have the following:

The first responder is the responder object in an application (usually a UIView object) that is designated to be the first recipient of events other than touch events.

But UIView is a subclass of UIResponder. And the UIResponder class reference says this:

- (BOOL)canBecomeFirstResponder

Return Value

YES if the receiver can become the first responder, NO otherwise. Discussion

Returns NO by default. If a responder object returns YES from this method, it becomes the first responder and can receive touch events and action messages. Subclasses must override this method to be able to become first responder.

I am confused by the apparent contradiction. Can anyone clear it up for me?

For what it's worth, I did set up a simple view-based application, and call canBecomeFirstResponder and isFirstResponder on its view. Both returned NO.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about first-responder