Information Technology Reference
In-Depth Information
Figure 7.30 shows the bottom of the implementation file. You can see that Xcode has generated supporting code
in four places. (For clarity, the new code is marked in the figure with breakpoint arrows. The arrows don't ap-
pear in a real project—they've been added by hand as illustrations, so you can see which lines have been modi-
fied.)
A new @synthesize directive has appeared. It synthesizes access to the labelproperty.
The label object has been included in the dealloc method. This ensures that the memory used by the
label object is released when the controller class is released from memory.
The label has been added to the viewDidUnload method. Code is included to set the label to nil .
The buttonWasTapped : method has been added as a separate stub.
NOTE
If you drop an outlet between curly brackets, the @synthesize and @property directives aren't added. This is usu-
ally a bad thing, but you can use this option when you want to add your own custom setter/getter code.
FIGURE 7.30
This is the complete implementation file. IB makes changes to this file at the same time as it updates the header
file.
Search WWH ::




Custom Search