iosobjective-cxcodecocoaresponder-chain

What are the "First Responder" and "Exit" boxes purpose in the storyboard editor?


In the XCode IDE, at the bottom of the view controller in the MainStoryboard editor, are two boxes: First Responder, and Exit.

I know what a firstResponder is programatically within the code, but in the storyboard editor, I can't seem to do anything useful by it.

Am I able to use the first responder in this area to somehow set the first responder of the view? I'd like the first textfield to be active on load and I have tried right+click and dragging to no avail. I know I can set it programatically in the viewDidLoad method, but is there some way of doing it here?

And what is the green Exit for?

First Responder (orange) and Exit (Green) - what are they for?


Solution

  • I've never used it and probably never will but you can assign an object to be the first in line to receive the events from the UI.

    I suppose you could be creating a UIView subclass and add it in to a UIViewController but you actually want some other object to receive and process the events other than the UIViewController you are adding it to.

    I found this link which kind of explains it a bit better.