Cocoa Programming for Mac OS X - Aaron Hillegass [145]
Info.plist, NSDocumentController, 163–164
inheritance
“inherits from”, vs. “uses” or “knows about”, 48
NSControl and, 84–85
in Objective-C, 26
in Objective-C vs. C++, 48
init method
creating and using instances, 36
as designated initializer for NSObject, 57
initializers with arguments and, 56–58
NSObject, 43
writing initializers, 55–56
initialFirstResponder method, keyboard events, 276–278
initialize method, registering defaults, 213
initializers. See also init method
with arguments, 56–58
conventions for creating, 57–58
initWithCoder: method, NSCoder, 160, 163
initWithFormat method, NSString, 47
insertObject method, NSMutableArray, 46
Inspection Range, Instruments, 433
Inspector panel, 16
installers, 464–466
instance variables
adding to classes, 21
archiving, 159
defined, 5
designing classes with, 148–149
enabling accessor methods for, 77–80
header files in Objective-C and, 26–27
isa pointer, 65–66
naming conventions for, 22
protected in Objective-C, 27
instances, creating, 5, 22, 35–37
Instruments
time profiling in, 431–434
defined, 4
Interface Builder
common mistakes, 8
creating an instance, 22
creating class, 20–22
dock, 20
functionality of, 15–16
interface layout, 17–19
making connections in, 22–25, 91–94
XIBs and NIBs, 17
interface layout
in Interface Builder, 17–19
overview of, 17–19
panels, 201–202
sheets, 331–334
International pane, System Preferences, 235
interpretKeyEvents method, NSResponder, 281
Invert Call Tree, Time Profiler, 433
invocations, 145–148
iOS development
adding navigation controller, 388–390
overview of, 383
pushing view controllers, 393–395
UITableViewController, 391–393
iOS SDK, 3
iPad apps, 383
iPhone apps, 383
isa pointer, messaging, 65–66
isARepeat method, NSEvent, 273
isEqual: message, NSArray, 45
isEqual: message, NSObject, 44
isFlipped, flipping views, 255
isOpaque method, project with keyboard events, 280
Issue navigator, 28
italics, drawing text with attributes, 294
J
Jump to Next Counterpart command, editing implementation file, 27
K
key paths
key-value observing, 127
overview of, 126–127
sorting people, 142
key-value coding
for bindings, 119–120
making keys observable, 123
and nil, 139–140
overview of, 117–119
to-many relationships and, 148–152
key-value observing
enabling undo for edits, 152–153
key paths, 126–127
making keys observable, 121–123
overview of, 120–121
properties, 124–126
understanding, 127
key-value pairs
dictionaries, 208
string table as collection of, 236
keyboard events
nextResponder, 414–415
NSEvent, 273–274
NSResponder, 273
overview of, 271–272
keyCode method, NSEvent, 274
keyDown event, 273, 281
keyUp event, NSResponder, 273
keywords, Objective-C, 27
KITT the super car, 99
Knight Industries, 99
“knows about”, “inherits from” vs., 48
KVC. See key-value coding
L
labels
objects in Interface Builder editor, 180
language
Objective-C, 4–5
Objective-C vs. C++, 2
Language and Text pane, System Preferences, 236
lastObject method, NSArray, 45
layers
Core Animation, 417, 419–421
implicit animation and actions, 423–424
lazy copying, drag and drop, 295–298, 304–305
length member, NSRange, 286
level indicator, 181–184
libraries. See framework
library of code, bundles, 205
Library panel, 17–19
LLVM (Low Level Virtual Machine) compiler
compiling Objective C-2, 5
defined, 35
static analyzer using, 63–64
loading
NIB files. See NIB files and NSWindowController
NSKeyedUnarchiver and, 168–169
using NSDocument, 166–167
Localizable.strings, 236–238
localization
explicit ordering of tokens in format strings and, 240
ibtool and, 239–240
Nib file and, 234–236
overview of, 233–234
string tables and, 236–239
location member, NSRange, 286
lock focus on view, drawRect, 246–247
Low Level Virtual Machine. See LLVM (Low Level Virtual Machine) compiler
M
Mac App Store
distributing