Appendix A. Exercise Solutions
This appendix gives some tips, hints, and answers to the exercises found at the end of each chapter.
Open a Finder window, and navigate to the /Developer/Applications folder. Drag the Project Builder and Interface Builder icons to your Dock.
Open a Finder window and navigate to the /Developer/Documentation/Cocoa folder. Drag the CocoaTopics.html file to your Dock.
One way to access the documentation:
Open the /Developer/Documentation/Cocoa/CocoaTopics.html file in your web browser of choice, click on the Foundation link in the Objective-C Framework Reference section, and then follow the
One way to find the documentation:
In the Foundation reference document that the
NSStringlinks are on, go to the bottom of the page, and click on the Functions link. You’ll find the
NSLogdocumentation on this page.
Use the Find functionality of your browser (Edit → Find, or
-F on most browsers) to search for the
NSLogdocumentation on this rather large page.
One way to do it is to add the following line to the
initWithName:artist:method of the Song class:
NSLog(@"isa: %@ self %@", isa, self);
This will print the name of the class as well as the description.
Here’s one way to do it:
Open the strings project we created, and place a breakpoint before the
release]statement. Debug the application, ...