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.
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 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.
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.