Chapter 3. Cocoa Touch: Putting Objective-C to Work
Now that you’ve gotten a taste of Objective-C, it’s time to put the language to work. If you think of Objective-C as the glue for building applications, you’re now going to explore the building blocks—parts of the Cocoa Touch frameworks—that get pieced together with your new adhesive.
Before you start gluing the components of the Cocoa Touch frameworks together, you’ll need to learn a bit about the architecture and design patterns recommended by Apple’s engineers. Just as knowing how the correct building materials work together helps to build a house, a good working knowledge of the frameworks lets you build more robust applications and save time.
You’ll also learn where to look for more information about Cocoa Touch. Plenty of resources on the Web and in your favorite bookstore can help you improve your iPhone development skills.
Get in Cocoa Touch
The Cocoa Touch frameworks are extensive, and hundreds of classes are at your disposal. Learning how to use this rich collection of components takes time. The best way to approach this Herculean task is to learn the common design patterns and functions implemented by the frameworks.
In the following sections, you’ll see how Cocoa Touch uses models, views, and controllers (MVC) to implement your application. You’ll also see how to use a target-action design pattern to hook the visual components to the code that does the actual work. In the process, you’ll see how delegation is a powerful ...