Unsure how to do a step in Chapter 16

In Chapter 16: Lists, on page 364, the book says:
“Connect the text field’s Did End on Exit event to the done action on the view controller.”

This is unclear to me. Can someone please show me where in a previous chapter this is shown clearly; or can someone just describe the steps I need to do.

Thank you in advance for any help.

You generally connect all events via the Connections inspector on the Interface Builder view. This was first illustrated way back in Chapter 2 - page 45 :slight_smile: If you check that page, you will find detailed instructions on how to connect an event to an action.

On that page the instructions are for connecting the “Touch Up Inside” event but you’ll notice in the screenshot that the Did End on Exit event is listed too. The process is the same no matter which event you are interested in …

If you select any UITextField in your storyboard (check the storyboard outline to make sure you are selecting a UITextField), and then you open the Connections Inspector, you will see this:

Click on the image to see a non-blurry version. You can see the Connections Inspector on the far right. If you drag from one of those circles at the end of each line to the yellow icon at the top of a ViewController in the storyboard, then you can select a method in the ViewController that will be called when the chosen event occurs.

If you don’t want to drag that far (who does?), select the UITextField and right click on it, and a popup menu with the same info will appear. You can drag that popup menu so that the circle you want to drag from is right next to the yellow icon in the storyboard that represents the UIViewController:

Got it! Thank you so much for answering my question. This is my first time using RWForums to answer a question. What a relief to have somewhere to turn when I’m stuck.

Perfect! Great explanation and great graphic. Thank you for your time in answering my question.

You’ll always find somebody here on the forums who is willing to answer your questions. If you don’t receive an answer hit me up on Twitter (the details should be in the book) and I’ll reply.

@dreyes You can also check out how to properly create an unwinding segue between your view controllers in our storyboards tutorial series as well:

I hope it helps. Thank you! :]

1 Like

Thank you for this link. I visited the tutorial and learned a lot, actually. Your animated sequences are very helpful.

This topic was automatically closed after 166 days. New replies are no longer allowed.