Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When the user clicks either Save or Cancel, we need to exit the modal view by asking the View Controller that presented the view to dismiss it. However, to make things easier, we can send the modal view the dismiss message, and it will automatically forward the message to its parent View Controller. Since the AddDrinkViewController is the modal view and gets the button call back, we can just send ourselves the dismiss message and the controller stack will handle it correctly. We need to send ourselves the dismissModalViewControllerAnimated: message, like this:
[self dismissModalViewControllerAnimated:YES];
Now, to see if those buttons work...