Cocoa Programming for Mac OS XThe best-selling introduction to Cocoa, once again updated to cover the latest Mac programming technologies, and still enthusiastically recommended by experienced Mac OS X developers. “Cocoa® Programming for Mac® OS X is considered by most to be the de-facto intro-to-OS X programming text.” —Bob Rudis, the Apple Blog
“I would highly recommend this title to anyone interested in Mac development. Even if you own the previous edition, I think you’ll find the new and revised content well worth the price.” —Bob McCune, bobmccune.com If you’re developing applications for Mac OS X, Cocoa® Programming for Mac® OS X, Fourth Edition, is the book you’ve been waiting to get your hands on. If you’re new to the Mac environment, it’s probably the book you’ve been told to read first.
Covering the bulk of what you need to know to develop full-featured applications for OS X, written in an engaging tutorial style, and thoroughly class-tested to assure clarity and accuracy, it is an invaluable resource for any Mac programmer. Specifically, Aaron Hillegass and Adam Preble introduce the two most commonly used Mac developer tools: Xcode and Instruments. They also cover the Objective-C language and the major design patterns of Cocoa. Aaron and Adam illustrate their explanations with exemplary code, written in the idioms of the Cocoa community, to show you how Mac programs should be written. After reading this book, you will know enough to understand and utilize Apple’s online documentation for your own unique needs. And you will know enough to write your own stylish code.
Updated for Mac OS X 10.6 and 10.7, this fourth edition includes coverage of Xcode 4, blocks, view-based table views, Apple’s new approach to memory management (Automatic Reference Counting), and the Mac App Store. This edition adds a new chapter on concurrency and expands coverage of Core Animation. The book now devotes a full chapter to the basics of iOS development. |
Contents
1 | |
11 | |
35 | |
Chapter 4 Memory Management | 67 |
Chapter 5 TargetAction | 83 |
Chapter 6 Helper Objects | 99 |
Chapter 7 KeyValue Coding and KeyValue Observing | 117 |
Chapter 8 NSArrayController | 129 |
Chapter 21 Pasteboards and NilTargeted Actions | 295 |
Chapter 22 Categories | 307 |
Chapter 23 DragandDrop | 311 |
Chapter 24 NSTimer | 321 |
Chapter 25 Sheets | 329 |
Chapter 26 Creating NSFormatters | 339 |
Chapter 27 Printing | 353 |
Chapter 28 Web Services | 359 |
Chapter 9 NSUndoManager | 145 |
Chapter 10 Archiving | 159 |
Chapter 11 Basic Core Data | 177 |
Chapter 12 NIB Files and NSWindowController | 193 |
Chapter 13 User Defaults | 207 |
Chapter 14 Using Notifications | 221 |
Chapter 15 Using Alert Panels | 229 |
Chapter 16 Localization | 233 |
Chapter 17 Custom Views | 241 |
Chapter 18 Images and Mouse Events | 257 |
Chapter 19 Keyboard Events | 271 |
Chapter 20 Drawing Text with Attributes | 285 |
Chapter 29 Blocks | 371 |
Chapter 30 Developing for iOS | 383 |
Chapter 31 View Swapping | 397 |
Chapter 32 Core Data Relationships | 407 |
Chapter 33 Core Animation | 417 |
Chapter 34 Concurrency | 427 |
Chapter 35 Cocoa and OpenGL | 441 |
Chapter 36 NSTask | 451 |
Chapter 37 Distributing Your App | 461 |
Chapter 38 The End | 471 |
473 | |