Ch 13 P. 269


Can anyone tell me why this works as I can’t figure out the connection between the Done button and the action method? I can’t find an explanation in the book.

  • (IBAction) save:(id)sender
    [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];

Thanks in advance.


Check to see if the Done button is connected to the First Responder in the XIB file.


Hi Ibex10

Done is listed (but not showing any connection to anything) to First Responder but I’m still not understanding why (IBaction) Save is connected to Done. Save and Cancel are listed in File’s Owner as a Received Action but no connections are showing. Everything works; but why?

Joe Conway can you help explain?

Thanks in advance again.


What do you mean by Done is listed to First Responder?

If the button is connected to First Responder, that explains why the the Save action is firing.


I went over the chapter again and found that messed up the changes to addNewItem on p. 268.

Problem fixed.