| Hello | 17 |
---|
| Before You Start | 17 |
| Where the Future Was Made Yesterday | 18 |
| What s Coming Up | 18 |
| Summary | 19 |
| Extensions to C | 20 |
---|
| The Simplest Objective-C Program | 20 |
| Deconstructing Hello Objective-C | 23 |
| Are You the Boolean Type? | 28 |
| Summary | 33 |
| Introduction to Object-Oriented Programming | 34 |
---|
| It s All Indirection | 35 |
| Using Indirection in Object-Oriented Programming | 45 |
| Time Out for Terminology | 57 |
| OOP in Objective-C | 58 |
| Summary | 70 |
| Inheritance | 71 |
---|
| Why Use Inheritance? | 71 |
| Inheritance Syntax | 76 |
| How Inheritance Works | 79 |
| Overriding Methods | 83 |
| Summary | 86 |
| Composition | 87 |
---|
| What Is Composition? | 87 |
| Accessor Methods | 92 |
| Extending CarParts | 98 |
| Composition or Inheritance? | 99 |
| Summary | 100 |
| Source File Organization | 101 |
---|
| Split Interface and Implementation | 101 |
| Breaking Apart the Car | 105 |
| Using Cross-File Dependencies | 107 |
| Summary | 114 |
| More About Xcode | 115 |
---|
| Changing the Company Name | 116 |
| Using Editor Tips and Tricks | 117 |
| WritingYour Code with a Little Help from Xcode | 119 |
| Getting Information | 135 |
| Debugging | 137 |
| Cheat Sheet | 143 |
| Summary | 144 |
| A Quick Tour of the Foundation Kit | 145 |
---|
| Some Useful Types | 146 |
| Stringing Us Along | 148 |
| Mutability | 153 |
| Collection Agency | 155 |
| Family Values | 165 |
| Example: Looking for Files | 168 |
| Summary | 173 |
| Memory Management | 174 |
---|
| Object Life Cycle | 175 |
| Autorelease | 180 |
| The Rules of Cocoa Memory Management | 184 |
| Summary | 190 |
| Object Initialization | 191 |
---|
| Allocating Objects | 191 |
| Initializing Objects | 192 |
| Isn t That Convenient? | 195 |
| More Parts Is Parts | 196 |
| Car Cleaning, GC Style | 205 |
| The Designated Initializer | 207 |
| Initializer Rules | 212 |
| Summary | 212 |
| Properties | 213 |
---|
| Shrinking Property Values | 214 |
| Objecting to Properties | 220 |
| Summary | 227 |
| Categories | 228 |
---|
| Creating a Category | 228 |
| Splitting an Implementation with Categories | 232 |
| Making Forward References with Categories | 237 |
| Informal Protocols and Delegation Categories | 238 |
| Summary | 245 |
| Protocols | 246 |
---|
| Formal Protocols | 246 |
| Carbon Copies | 248 |
| Objective-C 2.0 Goodies | 257 |
| Summary | 258 |
| Introduction to the AppKit | 259 |
---|
| Making the Project | 259 |
| Making the AppController @interface | 262 |
| Interface Builder | 263 |
| Laying Out the User Interface | 266 |
| Making Connections | 268 |
| AppController Implementation | 272 |
| Summary | 274 |
| File Loading and Saving | 275 |
---|
| Property Lists | 275 |
| Encoding Objects | 279 |
| Summary | 286 |
| Key-Value Coding | 287 |
---|
| A Starter Project | 287 |
| Introducing KVC | 290 |
| A Path! A Path! | 291 |
| Aggregated Assault | 292 |
| Life s a Batch | 300 |
| The Nils Are Alive | 302 |
| Handling the Unhandled | 302 |
| Summary | 304 |
| NSPredicate | 305 |
---|
| Creating a Predicate | 306 |
| Fuel Filters | 308 |
| Format Specifiers | 309 |
| Hello Operator, Give Me Number 9 | 311 |
| SELF Sufficient | 314 |
| String Operations | 315 |
| Like, Fer Sure | 316 |
| That s All, Folks | 316 |
| Coming to Objective-C from Other Languages | 317 |
---|
| Coming from C | 318 |
| Coming from C++ | 319 |
| Coming from Java | 324 |
| Coming from BASIC | 326 |
| Coming from Scripting Languages | 326 |
| Summary | 327 |
| Index | 328 |