Graphics Programs Reference
In-Depth Information
Figure 12.5 Creating and connecting an action method from a XIB
Let go of the mouse, and a window will appear that allows you to specify the type of con-
nection you are creating. From the
Connection
pop-up menu, choose
Action
. Then, name
Figure 12.6 Creating the action
Now the action method is declared in the header file, and the
UIBarButtonItem
in-
stance in the XIB is hooked up to send this message to the
DetailViewController
when tapped. Connecting an action method in this way also automatically adds a stub im-
plementation in
DetailViewController.m
:
- (IBAction)takePicture:(id)sender