@ (at symbol), 74
^ (carat), 264
: (colon), 145
- (hyphen), 142
[] (square brackets), 94
abstract classes, 106
accessing
objects in collections, 218
properties
with message syntax, 133
accessors
creating with @synthesize, 138
actions
disconnecting, 161
headers, 159
IBAction, 159
removing, 161
setting breakpoints on, 160
addObserver method, 186
addObserverForName method, 186
allObjects method, 215
anonymous categories. See extensions
anyObject method, 218
AppDelegate class
AppIcon.appiconset folder, 318
AppKit, 179
Apple developer program
Apple IDs, registering for, 10
enrolling in, 8
Safari program, 9
Apple IDs, registering for, 10
Apple LLVM Compiler 3.0, 223
AppleScript, 241
Application and Foundation Kits, 7
applicationDidFinishLaunchingWithOptions method, 201
Applications folder, 41
apps
iOS archives, 324
building with actions, 150-159
bundles
asset catalogs, 318
definition of, 317
lproj files, 318
plist files, 319
precompiled header files (.pch), 319
reasons for using, 318
Instruments, 310
testbed apps. See also testbed apps
building on iOS, 78
building on OS X, 79
ARC (automatic reference counting)
declared property attributes, 226-227
iOS archives, 324
arguments
overview, 145
setting, 174
arrays, 315
accessing objects in, 218
iterating through, 206
reading and writing, 213
testing membership in, 217
arrayWithArray method, 210
arrayWithContentsOfFile method, 213
arrayWithContentsOfURL method, 213
arrayWithObject method, 210
arrayWithObjects method, 210
asset catalogs, 318
associative references, 250-251
adding, 251
getting and setting, 252
hiding in declared property, 252
removing, 254
asynchronous tasks, adding to queues, 289
attributes of declared properties
accessor methods, 136
atomicity, 137
other attribute decorators, 137
setter semantics, 137
writability, 136
automatic reference counting (ARC), 113, 225-227
@autoreleasepool directive, 228
__autoreleasing— variable qualifier, 227
autoreleasing variables, 228
Availability.h file, 319
base objects, overriding, 29
Base.lproj file, 318
battery usage, 310
binding (dynamic), 117
__block storage type modifier, 269
block variables, creating, 264-265
Block_copy() function, 269
Block_release() function, 269
compared to callback functions, 264
in Cocoa, 266
copying to heap, 269
creating as block variables, 264-265
creating from callback functions, 265
enumerateKeysAndObjectsUsingBlock:, 268
enumerateLinesUsingBlock:, 267-268
enumerateObjectsUsingBlock:, 268
branches
breaking on conditions, 298-302
setting on actions, 160
building apps with actions, 150-159
bundles. See also packages
asset catalogs, 318
definition of, 317
lproj files, 318
plist files, 319
precompiled header files (.pch), 319
reasons for using, 318
Burroughs large systems, 132
business membership (developer program), 10
C language
control structures, 315
if statements, 315
repeat statements, 316
switch statements, 315
data types, 313
arrays, 315
enumerated type, 313
pointers, 314
struct, 314
development of, 24
The C Programming Language (2nd Edition) (Kernighan and Ritchie), 24, 313
C++, 24
calculate method, 133
compared to blocks, 264
creating blocks from, 265
calling methods, 104
callStackSymbols, 296
carat (^), 264
catalogs (asset), 318
catching exceptions, 280
categories, 30
alternatives to, 240
compared to protocols, 239
compared to subclasses, 241-242
confining modifications to, 242
informal protocols, 246
when to use, 240
changes
discarding, 56
checking out repositories, 60
choosing developer program, 8-10
@class directive, 74, 108, 117
class hierarchy, modifying, 241-242
class name, creating instance variables with, 117-119
classes, 25. See also protocols
abstract classes, 106
AppDelegate
associative references, 250-251
adding, 251
getting and setting, 252
hiding in declared property, 253
removing, 254
categories, 240
alternatives to, 240
compared to protocols, 239
compared to subclasses, 241-242
confining modifications to, 242
informal protocols, 246
when to use, 240
class hierarchy, modifying, 241-242
collection classes, 112-114, 209-210. See also collections
creating
CurrencyConverter
convertCurrency: method, 191-193
convertUnits: method, 193
convertUnits:withFactor: method, 194-200
creating instance variables with class name, 117-119
creating instance variables with superclass name, 119-123
CurrencyConverter.h file, 99-103
CurrencyConverter.m file, 104
history of, 98
instance variables, creating with id, 114-117
declaring
basic class declaration, 106-107
Foundation framework
root classes, 180
turning into protocols, 181
ARC (automatic reference counting), 113
placing class instances in context, 112
methods
actions, 107
addObserver, 186
addObserverForName, 186
allObjects, 215
anyObject, 218
applicationDidFinishLaunchingWithOptions, 201
arrayWithArray, 210
arrayWithContentsOfFile, 213
arrayWithContentsOfURL, 213
arrayWithObject, 210
calculate, 133
class methods, 35
class methods versus instance methods, 142-143
containsObject, 215
convertUnits:withFactor:, 194-200
description, 104
dictionaryWithContentsOfFile, 214
dictionaryWithContentsOfURL, 214
dictionaryWithDictionary, 210
dictionaryWithObject, 212
dictionaryWithObjects, 212
didFinishLaunchingWithOptions, 244, 262
draw, 104
enumerateKeysAndObjectsUsingBlock, 260, 268
enumerateLinesUsingBlock, 260, 267-268
enumerateObjectsUsingBlock, 260, 268
exceptionWithName, 278
hiding, 29
initWithBool, 142
initWithFactor, 201
instancesRespondToSelector, 176
invocationWithMethodSignature, 172
invoke, 175
invokeWithTarget, 175
keyEnumerator, 215
nextObject, 214
numberWithBool, 142
objectAtIndex, 218
objectEnumerator, 215
optional methods, 236
postNotification, 185
postNotificationName, 185
removeObserver, 186
respondsToSelector, 176
returning multiple result values from, 112-114
reverseObjectEnumerator, 215
setArgument, 174
setByAddingObject, 214
setByAddingObjectsFromArray, 214
setByAddingObjectsFromSet, 214
setSelector, 174
setTarget, 173
setter semantics, 137
setWithArray, 214
setWithObjects, 215
setWithSet, 210
superclass methods, 104
syntax, 141
useTypeDefFunction
Pointer, 262
writeToFile, 213
creating and enumerating, 215-217
enumerateObjectsUsingBlock: method, 268
iterating through, 206
NSAutoreleasePool, 228
NSDate, 208
NSDictionary
enumerateKeysAndObjectsUsingBlock: method, 268
NSEnumerationConcurrent, 266
NSEnumerationReverse, 267
NSEnumerator
NSEnumerator instances, creating, 215
overview, 256
NSNotification, 183
NSNotificationCenter, 185
NSNumber
getters, 192
NSOperationQueue, 287
NSProxy, 180
subclasses
compared to categories, 241-242
superclass methods, 104
cloning repositories, 60
Cocoa frameworks, 179
errors, 277
views, 78
windows, 78
Cocoa Touch frameworks, 179
errors, 277
code property (NSError), 274
accessing objects in, 218
arrays
reading and writing, 213
building from property lists at runtime, 209
collection classes, 112-114, 209-210
creating with literals, 212
dictionaries, reading and writing, 213-214
NSEnumerator instances, 215
mutable collections, 207
optimization, 211
sets, creating, 214
testing membership in, 217
colon (:), 145
color, setting for messages, 92-94
compiler directives
@autoreleasepool, 228
definition of, 66
@dynamic, 139
@finally, 275
#ifdef, 67
#ifndef, 67
@implementation, 74
#include, 68
@interface, 74
@required, 236
@selector, 169
concurrency
definition of, 283
dispatch queues, 288
adding asynchronous tasks to, 289
designing with, 290
global concurrent dispatch queues, 288-289
GCD (Grand Central Dispatch), 285-286
implementing, 284
queues
dispatch queues, 287
dispatch sources, 287
overview, 286
conditions, breaking on, 298-302
confining modifications to categories, 242
console logs
troubleshooting with, 294
viewing, 294
containsObject: method, 215
control structures, 315
if statements, 315
repeat statements, 316
switch statements, 315
Convert to Objective-C ARC command, 225
convertCurrency: method, 191-193
convertUnits: method, 193, 201
convertUnits:withFactor: method, 194-200
copying
blocks to heap, 269
method declarations, 143
Core Foundation framework, 180
counting references. See reference counting
Cox, Brad, 7
CPU utilization, monitoring, 306-307
creating. See also declaring
actions
associative references, 251
blocks
from callback functions, 265
classes
collections
with creation methods, 210-212
with literals, 212
iOS archives, 324
method signatures, 172
NSEnumerator instances, 215
NSInvocation object, 172
sets, 214
CurrencyConverter
convertCurrency: method, 191-193
convertUnits: method, 193
convertUnits:withFactor: method, 194-200
CurrencyConverter.h file, 99
CurrencyConverter.m file, 104
history of, 98
instance variables
creating with class name, 117-119
creating with superclass name, 119-123
cut back, 132
dangling pointers, 227
data types, 313
arrays
iterating through, 206
overview, 315
dynamic typing, 190
enumerated type, 313
pointers, 314
primitive types, 205
struct, 314
monitoring CPU utilization, 306-307
monitoring memory utilization, 307-308
debugger
breaking on conditions, 298-302
console logs
troubleshooting with, 294
viewing, 294
documentation, 302
debugging, 302
monitoring CPU utilization, 306-307
monitoring memory utilization, 307-308
debugger
documentation, 302
with description method, 104
with Instruments app, 310
declared properties
adding, 201
declaring. See also creating
classes
basic class declaration, 106-107
arguments, 145
return values, 143-144, 146-147
writing method declarations, 146
properties
attributes, 133
memory management, 132
variables
basic variable declaration, 128-130
legacy instance variable declarations, 138
delegates, 264
Master-Detail Application template example, 232-235
overview, 233
description method, 104
design patterns, 149
with queues, 290
Developer folder, 41
developer program
Apple IDs, registering for, 10
enrolling in, 8
Safari program, 9
Developer Technical Support (DTS), 9
development of Git, 48
development of Objective-C, 7-8
dictionaries
accessing objects in, 218
testing membership in, 217
dictionaryWithContentsOfFile method, 214
dictionaryWithContentsOfURL method, 214
dictionaryWithDictionary method, 210
dictionaryWithObject method, 212
dictionaryWithObjects method, 212
didFinishLaunchingWithOptions method, 244, 262
directives
@autoreleasepool, 228
definition of, 66
@dynamic, 139
@finally, 275
#ifdef, 67
#ifndef, 67
@implementation, 74
#include, 68
@interface, 74
@required, 236
@selector, 169
discarding changes with Git, 56
disconnecting actions, 161
dispatch queues, 288
adding asynchronous tasks to, 289
designing with, 290
explained, 287
global concurrent dispatch queues, 288-289
dispatch sources, 287
distributed objects, 182
documentation for debugger, 302
domain codes (NSError), 274
domain property (NSError), 274
dot syntax, accessing properties with, 134-135
downloading Xcode, 41
draw method, 104
DTS (Developer Technical Support), 9
dynamic binding, 117
@dynamic directive, 139
dynamic typing, 190
dynamism, 273
Edit Breakpoint menu, 299
encapsulation
variable declarations, 129-130
enterprise program (developer program), 10
enumerated type, 313
enumerateKeysAndObjectsUsingBlock method, 260, 268
enumerateLinesUsingBlock method, 260, 267-268
enumerateObjectsUsingBlock method, 260, 268
enumeration,
block enumeration methods, 265-267
enumerateKeysAndObjectsUsingBlock, 268
enumerateLinesUsingBlock, 267-268
enumerateObjectsUsingBlock, 268
NSEnumerator instances, 215
with NSEnumerator, 256
without NSEnumerator, 255
NSEnumerationConcurrent, 266
NSEnumerationReverse, 267
small objects, 267
error codes (NSError), 276
errors
in Cocoa and Cocoa Touch, 276-277
compared to exceptions, 272
exceptions
catching, 280
compared to errors, 272
exceptionWithName method, 278
expressions, logging, 296
with NSEnumerator, 256
without NSEnumerator, 255
fields, text, 81
connecting to code in iOS, 88-91
connecting to code in
OS X, 91
__FILE__ macro, 295
file system classes, 181
files
Availability.h, 319
creating dictionaries from, 214
implementation files. See implementation files, defining classes in
lproj, 318
missing files, 65
.pch files, 66
plist, 319
plist files, 66
precompiled header files (.pch), 319
.rtf files, 65
.strings files, 65
writing arrays to, 213
.xib files, 65
@finally, 275
folders
AppIcon.appiconset, 318
Applications, 41
Developer, 41
Images.xcassets, 318
LaunchImage.launchimage, 318
for loops, adding to breakpoints, 298-302
Foundation framework
classes
root classes, 180
turning into protocols, 181
Core Foundation framework, 180
posting, 185
registering to receive, 186
removing observers, 186
__func__ macro, 295
functions. See also methods
Block_copy(), 269
Block_release(), 269
compared to blocks, 264
creating blocks from, 265
objc_getAssociatedObject, 251-252
objc_removeAssociatedObjects, 251
objc_setAssociatedObject, 250, 251, 254
typedef function pointer, 261-262
garbage collection, 222
GCD (Grand Central Dispatch), 285-286
getReturnValue method, 174-175
discarding changes, 56
history of, 48
global concurrent dispatch queues, 288-289
Grand Central Dispatch (GCD), 285-286
headers
action headers, 159
precompiled header files (.pch), 319
heap, copying blocks to, 269
hiding
associative references in declared property, 253
methods, 29
history of Git, 48
history of Objective-C, 7-8, 249-250
hyphen (), 142
IBAction, 159
IBOutlet, 137
id variable, 35
identifying exceptions, 275-278
if statements, 315
#ifdef directive, 67
#ifndef directive, 67
imageset folders, 318
Images.xcassets folder, 318
@implementation directive, 74
implementation files, defining classes in
convertCurrency: method, 191-193
convertUnits: method, 193
method implementation, 197-200
implementing
concurrency, 284
object-oriented programming, 21-22
#include directive, 68
informal protocols, 246
initWithBool method, 142
initWithFactor method, 201
inline function pointers, 261
instance methods, versus class methods, 142-143
instance variables. See also associative references
compared to properties, 127
creating for CurrencyConverter
declaring
legacy instance variable declarations, 138
visibility, 123
instances
overview, 25
testing whether instance can respond to selector, 175-176
instancesRespondToSelector method, 176
instanceType keyword, 36
instantiating classes, 111-112
ARC (automatic reference counting), 113
placing class instances in context, 112
Instruments, 310
Interface Builder, selectors with, 171
@interface directive, 74
interprocess communication (IPC), 182
invocationWithMethodSignature method, 172
invoke method, 175
invokeWithTarget method, 175
invoking NSInvocation object, 175
iOS projects
actions
building projects with, 155-157
iOS archives, creating, 324
structure of, 64
testbed apps
building, 78
connecting text fields to code, 89-91
sending messages to text fields, 92-94
IPC (interprocess communication), 182
iterating through arrays, 206
ivars. See instance variables
Jobs, Steve, 7
Kay, Alan, 165
Kernighan, Brian W., 24
keyEnumerator method, 215
keywords
instanceType, 36
strong, 226
unsafe_unretained, 227
weak, 226
language services, 182
LaunchImage.launchimage folder, 318
legacy instance variable declarations, 138
__LINE__ macro, 295
literals, creating collections with, 212
localization, lproj files, 318
locks, synchronizing with, 287
logs
troubleshooting with, 294
viewing, 294
lproj files, 318
Mac archives, creating, 322-323
Mac OS developer program, 9-10
macro definition directive, 66-67
macros, logging, 295
managing memory. See memory management
manual reference counting, 222-225
membership categories (developer program), 9-10
membership in collections, testing, 217
autoreleasing variables, 228
blocks, copying to heap, 269
garbage collection, 222
for objects, 132
reference counting
ARC (automatic reference counting), 225-227
explained, 222
manual reference counting, 222-225
variable qualifiers, 227
memory utilization, monitoring, 307-308
messages
accessing properties with, 133
adding to breakpoints, 298-300
nesting, 36
receivers, 166
release, 224
selectors
creating with @selector, 169
with Interface Builder, 171
overview, 166
setting, 174
testing whether instance can respond to selector, 175-176
signatures, creating, 172
structure of, 92
methods. See also functions; protocols
accessors
creating with @synthesize, 138
actions, 107
addObserver, 186
addObserverForName, 186
allObjects, 215
anyObject, 218
applicationDidFinishLaunchingWithOptions, 201
arrayWithArray, 210
arrayWithContentsOfFile, 213
arrayWithContentsOfURL, 213
arrayWithObject, 210
calculate, 133
class methods, 35
class methods versus instance methods, 142-143
containsObject, 215
convertUnits:withFactor:, 194-200
arguments, 145
return values, 143-144, 146-147
writing method declarations, 146
description, 104
dictionaryWithContentsOfFile, 214
dictionaryWithContentsOfURL, 214
dictionaryWithDictionary, 210
dictionaryWithObject, 212
dictionaryWithObjects, 212
didFinishLaunchingWithOptions, 244, 262
draw, 104
enumerateKeysAndObjectsUsingBlock, 260, 268
enumerateLinesUsingBlock, 260, 267-268
enumerateObjectsUsingBlock, 260, 268
exceptionWithName, 278
hiding, 29
initWithBool, 142
initWithFactor, 201
instancesRespondToSelector, 176
invocationWithMethodSignature, 172
invoke, 175
invokeWithTarget, 175
keyEnumerator, 215
nextObject, 214
numberWithBool, 142
objectAtIndex, 218
objectEnumerator, 215
optional methods, 236
postNotification, 185
postNotificationName, 185
removeObserver, 186
respondsToSelector, 176
return values, getting, 174-175
returning multiple result values from, 112-114
reverseObjectEnumerator, 215
setArgument, 174
setByAddingObject, 214
setByAddingObjectsFromArray, 214
setByAddingObjectsFromSet, 214
setSelector, 174
setTarget, 173
setter semantics, 137
setWithArray, 214
setWithObjects, 215
setWithSet, 210
superclass methods, calling, 104
syntax, 142
useTypeDefFunctionPointer, 262
writeToFile, 213
missing files, 65
modifying class hierarchy, 241-242
monitoring
with Instruments app, 310
multiple result values, returning from methods, 112-114
mutable collections, 207
MyApp-Info.plist file, 319
name property (NSException), 274
Name value (NSNotification), 183
names
class name, creating instance variables with, 117-119
superclass name, creating instance variables with, 119-123
nesting messages, 36
NeXT, 7
nextObject method, 214
NeXTSTEP, 7
nil value, 212
posting, 185
registering to receive, 186
removing observers, 186
creating and enumerating, 215-217
enumerateObjectsUsingBlock: method, 268
iterating through, 206
NSAutoreleasePool class, 228
NSDate class, 208
NSDictionary class
enumerateKeysAndObjectsUsingBlock: method, 268
NSEnumerationConcurrent class, 266
NSEnumerationReverse class, 267
NSEnumerator class, 256
NSEnumerator instances, creating, 215
NSInvocation object
creating, 172
invoking, 175
overview, 172
NSLogv class, 295
NSNotification class, 183
NSNotificationCenter class, 185
NSNumber class
getters, 192
NSOperationQueue class, 287
NSProxy class, 180
NSSet class
enumerateObjectsUsingBlock: method, 268
NSString class
enumerateLinesUsingBlock: method, 267-268
overview, 209
NSStringFromClass, 296
NSStringFromSelector class, 296
numberWithBool method, 142
objc_getAssociatedObject function, 251-252
objc_removeAssociatedObjects function, 251
objc_setAssociatedObject function, 250, 251, 254
Object Oriented Programming: An Evolutionary Approach (Cox), 179
Object value (NSNotification), 184
objectAtIndex method, 218
objectEnumerator method, 215
object-oriented programming
accessors, 28
classes, 25
frameworks
overview, 22
instances, 25
messages
nesting, 36
overview, 33
methods
class methods, 35
declaring, 34
objects
overview, 21
projects, 22
variables
strongly typed variables, 35-36
objects. See also classes
associative references, 250-251
adding, 251
getting and setting, 252
hiding in declared property, 253
removing, 254
base objects, overriding, 29
collections
accessing objects in, 218
arrays, reading and writing, 213
building from property lists at runtime, 209
creating with literals, 212
dictionaries, reading and writing, 213-214
mutable collections, 207
optimization, 211
sets, creating, 214
testing membership in, 217
debugging, 104
delegates
Master-Detail Application template example, 232-235
overview, 233
distributed objects, 182
memory management. See memory management
NSInvocation
creating, 172
invoking, 175
overview, 172
receivers, 166
selectors
creating with @selector, 169
with Interface Builder, 171
overview, 166
setting, 174
testing whether instance can respond to selector, 175-176
observers, removing, 186
operating system services, 181
optimization for collections, 211
optional methods (protocols), 236
actions
building projects with, 151-154
testbed apps
connecting text fields to code, 88
sending messages to text fields, 92-94
overriding base objects, 29
packages, definition of, 317
iOS archives, 324
paradigms, 149
pasting method declarations, 143
.pch files (precompiled header files), 66, 319
personal membership (developer program), 9-10
placing class instances in context, 112
pointers, 314
dangling pointers, 227
inline function pointers, 261
typedef function pointer, 261-262
posting notifications, 185
postNotification method, 185
postNotificationName method, 185
precompiled header files (.pch), 66, 319
predicates, 181
__PRETTY_FUNCTION__ macro, 295
primitive types, 205
private variables, 123
project info, 12
projects
files
iOS projects, 64
object-oriented projects, 22
project info, 12
source code control
structure of, 63
targets, 12
properties
accessing
with message syntax, 133
adding to code, 133
accessor methods, 136
atomicity, 137
other attribute decorators, 137
setter semantics, 137
writability, 136
compared to instance variables, 127
declared properties
adding, 201
declaring
attributes, 133
memory management, 132
property lists
building collections from at runtime, 209
writing dictionaries as, 213
strong, 133
property lists
building collections from at runtime, 209
writing dictionaries as, 213
protected variables, 123
protocols, 30
compared to categories, 239
informal protocols, 246
Master-Detail Application template example, 232-235
optional methods, 236
turning classes into, 181
public variables, 123
qualifiers, variable qualifiers, 227
queues
dispatch queues, 287
adding asynchronous tasks to, 289
designing with, 290
explained, 287
global concurrent dispatch queues, 288-289
dispatch sources, 287
overview, 286
reading
arrays, 213
reason property (NSException), 274
receivers, 166
receiving notifications, 186
ARC (automatic reference counting)
declared property attributes, 226-227
explained, 222
manual reference counting, 222-225
references
associative references, 250-251
adding, 251
getting and setting, 252
hiding in declared property, 253
removing, 254
reference counting
ARC (automatic reference counting), 113
explained, 222
manual reference counting, 222-225
registering
for Apple IDs, 10
for notifications, 186
removeObserver method, 186
removing
actions, 161
associative references, 254
observers, 186
repeat statements, 316
repositories
checking out, 60
cloning, 59
@required directive, 236
respondsToSelector method, 176
return values
returning multiple result values from methods, 112-114
reverseObjectEnumerator method, 215
Rhapsody, 7
Ritchie, Dennis M., 24
root classes (Foundation framework), 180
.rtf files, 65
Safari developer program, 9
Sams Teach Yourself C in 21 Days (Jones and Aitkin), 313
scripting methods, 182
@selector directive, 169
selectors
creating with @selector, 169
with Interface Builder, 171
overview, 166
setting, 174
testing whether instance can respond to selector, 175-176
sending messages to text fields, 92-94
setArgument method, 174
setByAddingObject method, 214
setByAddingObjectsFromArray method, 214
setByAddingObjectsFromSet method, 214
sets
accessing objects in, 218
creating, 214
testing membership in, 217
setSelector method, 174
setTarget method, 173
setWithArray method, 214
setWithObjects method, 215
setWithSet method, 210
signatures (method)
creating, 172
Simula, 24
small-scale enumeration, 267
source code control
branches
discarding changes, 56
history of, 48
Subversion, 58
square brackets ([]), 94
statements
if, 315
repeat, 316
switch, 315
step-by-step conversion routine, building, 194-200
.strings files, 65
stringWithUTF8String, 296
strong keyword, 226
strong property, 133
__strong— variable qualifier, 227
strongly typed variables, 35-36
struct type, 314
subclasses
compared to categories, 241-242
Subversion
on single computer, 58
superclass methods, calling, 104
superclass name, creating instance variables with, 119-123
switch statements, 315
at symbol (@), 74
synchronizing with locks, 287
@synthesize directive, 130-132, 138
targets
overview, 12
setting, 173
tasks, adding to queues, 289
building on iOS, 78
building on OS X, 79
text fields, 81
connecting to code in iOS, 89-91
connecting to code in OS X, 91
testing
membership in collections, 217
whether instance can respond to selector, 175-176
text fields, 78
connecting to code in iOS, 89-91
connecting to code in OS X, 91
threading methods, 182
time-saving features
associative references, 250-251
adding, 251
getting and setting, 252
hiding in declared property, 253
removing, 254
with NSEnumerator, 256
without NSEnumerator, 255
Torvalds, Linus, 48
tracking changes with Git, 52-55
troubleshooting. See also debugging
errors
in Cocoa and Cocoa Touch, 277
compared to exceptions, 272
exceptions
catching, 280
compared to errors, 272
typedef function pointer, 261-262
types, 313
arrays
iterating through, 206
overview, 315
dynamic typing, 190
enumerated type, 313
pointers, 314
primitive types, 205
struct, 314
UIKit, 179
university team membership (developer program), 10
unsafe_unretained keyword, 227
__unsafe_unretained— variable qualifier, 227
URLs
creating dictionaries from, 214
URL classes, 182
writing arrays to, 213
writing dictionaries to, 214
userInfo property
NSError class, 274
NSException class, 274
userInfo value (NSNotification), 185
useTypeDefFunctionPointer method, 262
value objects, 180
variable qualifiers, 227
variables
autoreleasing variables, 228
declaring
basic variable declaration, 128-130
legacy instance variable declarations, 138
id, 35
instance variables. See also associative references
compared to properties, 127
creating for CurrencyConverter, 114-117
creating for CurrencyConverter with class name, 117-119
creating for CurrencyConverter with superclass name, 119-123
visibility, 123
strongly typed variables, 35-36
variable qualifiers, 227
viewing console logs, 294
views (Cocoa), 77
visibility of instance variables, 123
weak keyword, 226
__weak— variable qualifier, 227
windows (Cocoa), 77
writability, 136
writeToFile method, 213
writing
arrays, 213
method declarations, 146
Xcode
downloading, 41
iOS projects, 64
project info, 12
structure of, 63
source code control
Subversion, 58
targets, 12
Xerox PARC, 165
.xib files, 65
XML support classes, 181
3.146.221.149