According to Apple's documentation:
When your app receives an event, UIKit automatically directs that event to the most appropriate responder object, known as the first responder.
Same documentation explain how first responder is determined:
The hitTest:withEvent: method of UIView traverses the view hierarchy, looking for the deepest subview that contains the specified touch, which becomes the first responder for the touch event.
What I don't understand is why there is a property of UIResponder called isFirstResponder
? And why becomeFirstResponder
exists. Should not the first responder be determined dynamically by UIKit based on location of the specific touch event?
Additionally, canBecomeFirstResponder
return NO
for UIView
, which is clearly incorrect since views do handle touch events.
The only way I can think that can resolve this confusion is if all these methods are relevant only to events of the type of shake, remote control and editing menu. But the documentation is not clear about it.