Information Technology Reference
In-Depth Information
CAUTION
Don't create the action inside the curly brackets or above them. Add it to the area beneath them, but above the
@end directive. Although you can add an action to an implementation file, it's easier to add it to a header file, be-
cause the header holds a simple and clear list of every action, without supporting code.
FIGURE 7.24
When adding an action, the line between the Connections Inspector and the code appears automatically.
Naming and initializing the action
When you release the mouse, the pop-up dialog box shown in Figure 7.25 appears. To finish adding the action,
you must give it a name. Optionally, you can define the parameters that are passed to the method.
The Name field sets the name. It's best to give each method a clear and descriptive title. Otherwise, the name is
arbitrary, but it must be unique to the class it appears in. This example uses buttonWasTapped .
NOTE
Class and property names use camel code. The first letter is lowercase. For clarity, subsequent words begin with a
capital letter.
Search WWH ::




Custom Search