A B C D E F G H I K-L M N O P Q R S T U V W-X-Y-Z
sharing properties and methods, 329-330
@class directive, sharing properties and methods, 329-330
@implementation directive, 81
@property directive, 76-78, 171
Accelerate framework (Core OS layer), 108
acceleration
Accessibility options, IB (Interface Builder), 150-151
Accounts framework (Core Services layer), 106
button press response, 314-316
actions
BackgroundColor project, creating and connecting, 516-518
BestFriend project, creating and connecting, 711-712
ColorTilt project, creating and connecting, 633-635
CustomPicker project, creating and connecting, 406-407
DateCalc project, creating and connecting, 391-392
FieldButtonFun project, creating and connecting, 219
FlowerWeb project, creating and connecting, 271-274
Gestures project, creating and connecting, 605-607
GettingAttention project, creating and connecting, 303-305
HelloNoun project, creating and connecting, 186-188
IB (Interface Builder), connecting to, 159-161
ImageHop project, creating and connecting, 242-246
LetsNavigate project, creating and connecting, 442-443
LetsTab project, creating and connecting, 450-452
ModalEditor project, creating and connecting, 360-361
Scroller project, creating and connecting, 285-286
Survey project, creating and connecting, 536-539
Address Book, 693-697, 708-725
people picker delegate, 695-697
action sheets, implementing, 313-316
multibutton, creating, 306-309
System Sound Services, 298-300, 316-318
button press response, 309-310
interface
enabling orientation changes, 577
planning properties and connections, 577
animations
resources, adding, 233
speed
incrementing, 251
starting and stopping, 248-249
development provisioning profile, 13
Apple developer tools, 20
application data sources, implementing, 488-492
application logic, 229
Address Book, implementing, 712-717
BackgroundColor project, implementing, 518-521
BackgroundDownload project, implementing, 782-784
ColorTilt project, implementing, 635-642
Cupertino project
FieldButtonFun project, implementing, 224-225
FlowerColorTable project, implementing, 476-481
FlowerWeb project, implementing, 274-278
Gestures project, implementing, 607-616
ImageHop project, implementing, 246-252
LetsTab project, implementing, 452-455
ModalEditor project, implementing, 362-363
Orientation project, implementing, 628-630
PopoverEditor project, implementing, 368-370
ReturnMe project, implementing, 532-534
Scroller project, implementing, 286-287
SlowCount project, implementing, 776-778
Survey project, implementing application logic, 539-543
Swapper project, implementing, 587-589
Universal project, implementing, 797-798
UniversalToo project, implementing, 802
application resource constraints, 4
applications. See also projects
disabling, 763
direct file system access, 510-514
HelloXcode, 26
adding new code files to, 28
managing properties, 51
removing files and resources, 32
MVC (Model-View-Controller), 167-168
Single View Application template, 173-190
suspension, 758
tracing, 809
NSLog function, 810
applicationWillEnterForeground method, 764
apps. See applications
ARC (Automatic Reference Counting), 662
Archives and Serializations Programming Guide for Cocoa, 543
assistant editor (Xcode), 42-44
attitude
attributed text fields, versus plain, 207-209
attributes
tables, setting, 462
text fields
traits, 207
Attributes Inspector (IB), 149-150
audio, Cupertino project, preparing for, 768-773
Auto Layout, 548, 550, 597-598
building responsive interfaces, 552-575
Constraints object, navigating, 554-562
Auto Layout system (IB), 145-148
Automatic Reference Counting (ARC). See ARC (Automatic Reference Counting)
AV Audio Player, 655
controlling audio playback, 675-677
handling playback completion, 656
AV Foundation framework, 105, 655-657
AV Audio Player, 655
handling playback completion, 656
background fetches, 760
background processing
background suspension, 758
completing long-running, 773-780
BackgroundColor project, 544
application logic, implementing, 518-521
designing interface, 515
outlets and actions, creating and connecting, 516-518
setting up, 515
BackgroundDownload project
building, 784
creating and connecting outlet, 782
designing interface, 781
implementing application logic, 782-784
disabling, 763
navigation controllers, 424-425
BestFriend project
Address Book, implementing logic, 712-717
designing interface, 745
email logic, implementing, 720-721
Maps, implementing logic, 717-719
outlets and actions, creating and connecting, 711-712
social networking logic, implementing, 721-723
status bar, setting to white, 723
blur effect (iOS 7), adding, 743
breakpoint navigator, Xcode debugger, 826-828
browsing, documentation, 123-124
building applications, Xcode, 46-51
button templates, preparing with slicing, 199-204
action sheets, button press response, 314-316
alert views, button press response, 309-310
images
adding to, 200
styled, adding, 212
templates, preparing with slicing, 199-204
calculateDateDifference method, 398-400
case sensitivity, Objective-C, 72
Castillo, Cesar Pinto, 275
categories
classes, 70
cells, tables, 460
disabling editing, 495
centering constraints, Auto Layout, 562-565
CFNetwork framework (Core Services layer), 106
class methods, 70
classes, 69
categories, 70
GenericViewController, 440
MPMediaItem, 648
MPMediaItemCollection, 648
MPMediaPickerController, 648
MPMoviePlayerController, 648
MPMusicPlayerController, 648-650
NSDate, 116
NSMutableString, 113
NSObject, 111
NSString, 113
singletons, 69
subclasses, 69
superclasses, 69
UIApplication, 111
UIBarButtonItem, 375
UIButton, 117, 195, 199-204, 231
UIControl, 112
UIDatePicker, 119, 377-378, 417
UIGestureRecognizer, 617
UIImagePickerController, 648
UILongPressGesture Recognizer, 594, 617
UIPanGestureRecognizer, 594, 617
UIPicker, 119
UIPinchGestureRecognizer, 594
UIPopoverController, 120, 347-348, 373
UIResponder, 112
UIRotationGestureRecognizer, 594
UIScrollViewDelegate, 288
UISegmentedControl, 118, 259, 288
UISwipeGestureRecognizer, 594
UITapGestureRecognizer, 594
UITextFieldDelegate, 226
UITextViewDelegate, 226
UIViewController, 113
UIWebView, 288
UIWindow, 112
Cocoa, versus Cocoa Touch, 103
application life cycle, tracing, 109-110
versus Cocoa, 103
iOS technology layers, 104-105
code
HelloXcode app
writing
IB (Interface Builder), 162-163
Xcode, 188
code files, Xcode projects, adding to, 28-32
Accessing Properties from the Popover Upon Dismissal, 348
Accessing the Popover’s contentViewController, 368
Activating Interface Rotation, 549
Adding a Method in GenericViewController.m to Update Each Scene’s Counter, 455
Adding Audio Feedback When the Heading Updates, 771-772
Adding the foundRotation Method, 613
Adding the getFlower Implementation, 276
Applying a Filter to the Image in the UIImageView, 681
Asking to Become a First Responder, 615-616
Calculating a Heading to a Destination, 750-751
Calculating the Date Difference, 400
Calculating the Difference Between Two Dates, 398-399
Calculating the Distance When the Location Updates, 741
Calling the NSLog Function, 810
Centering the Map and Adding an Annotation, 718
Changing the Label as the Orientation Changes, 629-630
Cleaning Up After the Movie Player, 670
Completed setOutput Method, 190
Completed setSpeed Method, 249-250
Completed ViewController.h Interface File, 246
Completing the recordAudio Method, 676
Configuring a Cell to Display in the Table View, 478
Configuring and Displaying the Mail Compose View, 720
Configuring the Detail View Using the detailItem, 497
Configuring the Sections and Row Count for the Table View, 465
Creating a Method to Display the User’s Selection, 414-415
Creating and Initializing the Audio Recorder, 672-673
Creating the Location Manager Instance, 739
Customizing the Annotation View, 705, 719
Defining the Minimum Background Fetch Interval, 783
Detecting and Displaying the Active Device, 798
Disabling Editing of Table Cells, 495
Disabling Editing of the UI, 495
Disabling Interface Rotation, 642
Disabling the Upside-Down Orientation, 584
Disallowing Drilldown Past an Individual Contact, 714
Dismissing the Mail Compose View, 721
Dismissing the Modal Scene, 396, 409
Dismissing the People Picker, 695
Displaying the Media Picker, 685-686
doAlertInput Implementation, 311
Editing the viewDidLoad Method, 815
Enabling iPhone Access to the Detail View Controller, 499
Enabling Scrolling in Your Scroll View, 287
Enabling the Ability to Be a First Responder, 615
Example of the Tap Gesture Recognizer, 594-595
Final viewDidLoad Implementation, 684-685
Finishing the Background Fetch by Implementing application:performFetch WithCompletionHandler, 783
Forward Geocoding, 706
Grabbing and Configuring the UIPopoverController, 347
Handling a Row Selection Event, 480
Handling a User’s Music Selection, 686
Handling Button Touches, 582
Handling Drilling Down to Individual Properties, 696
Handling Empty Selections in the Media Picker, 687
Handling Heading Updates, 734
Handling Location Manager Errors, 740
Handling Playback Completion, 656
Handling Rotation in didRotateFromInterface Orientation, 582
Handling the Alert View Input Fields, 312
Handling the Canceling of the People Picker Display, 713
Handling the Cancellation of a Media Selection, 652
Handling the Cancellation of an Image Selection, 660, 680
Handling the Composition Completion, 700
Handling the Dismissal of the Popover, 370
Handling the Heading Updates, 752
Handling the Notification of Playback Completion, 651
Handling the Selection of a Contact, 715
Handling the Selection of an Address Book Record, 696
Handling the Selection of an Image, 659
Handling the Selection of Media Items, 653
Handling the User’s Selection of an Image, 679
Hiding the Keyboard, 223
Hiding the Keyboard When It Isn’t Needed, 539
Hiding the Keyboard When Its Done Key Is Pressed, 363
Implementation File, 79
Implementing a Custom Picker Data Source Protocol, 380-381
Implementing a Custom Picker Delegate Protocol, 382
Implementing a Simple Tweet Compose View, 722-723
Implementing a UIActionSheet Class, 295
Implementing a UIAlertView Object, 293
Implementing Location Updates, 729
Implementing playAudio Method, 675
Implementing the applicationWillEnter Foreground Method, 764
Implementing the chooseImage Method, 677-678
Implementing the control Hardware Method, 637
Implementing the createStory Method, 224-225
Implementing the describe Integer Method, 815
Implementing the doAcceleration Method, 640-641
Implementing the doActionSheet Method, 313
Implementing the doAlert Method, 306
Implementing the doAttitude Method, 640
Implementing the doRotation Method, 641
Implementing the doSound Method, 317
Implementing the doVibration Method, 318
Implementing the Final setBackgroundHueValue Method, 519
Implementing the foundPinch Method, 610-611
Implementing the foundSwipe Method, 610
Implementing the foundTap Method, 609
Implementing the incrementCount Method, 444
Implementing the Initial doMultipleButtonAlert Method, 308
Implementing the Initial setBackgroundHueValue Method, 518
Implementing the iPad’s Popover-Enabled chooseImage Method, 678-679
Implementing the newBFF Method, 713
Implementing the playMusic Method, 688
Implementing the setIncrement Method, 251
Implementing the setValuesFromPreferences Method, 533
Implementing the showResults Method, 541
Implementing the storeSurvey Method, 540
Implementing the toggleFlowerDetail Method, 275
Implementing the viewDidAppear Method, 608-609
Implementing updateInterface, 580
Initializing the Interface When the Application Loads, 581
Initializing the Motion Manager, 637
Initializing the Movie Player, 668
Initializing the Sound File References in viewDidLoad, 770
Initiating Movie Playback, 669
Loading and Playing a Sound, 299
Loading the Animation, 247
Loading the Data Required for the Picker View, 410
Loading the Settings When the Initial View Loads, 534
Performing a Default Calculation When the Date Chooser Is First Displayed, 400
Placing an Annotation, 704
Populating the Field with the Current Email Address, 362
Populating the Flower Arrays, 476
Populating the Flower Data Structures, 489-490
Preparing and Showing the Compose Dialog, 699
Preparing the Audio Player with a Default Sound, 674-675
Preparing the Interface (But Don’t Display It Yet), 578-579
Preparing to Post to Facebook, 701
Presenting the Picker with Custom Views, 383-384
Processing a CIImage with a CIFilter, 661
Providing a Custom View for Each Possible Picker Element, 412
Reacting to a User’s Selection, 415
Reacting to a User’s Touch, 467-468
Reacting to Core Location Errors, 731
Requesting Heading Updates, 747-748
Responding to a Shake Gesture, 616
Responding to an Action Sheet, 298
Responding to an Action Sheet Button Press, 314
Responding to an Alert View, 295
Responding to an Alert View Button Press, 310
Returning a Count of the Rows (Array Elements) in Each Section, 477
Returning a Heading for Each Section, 478
Returning the Number of Components, 411
Returning the Number of Elements per Component, 411
Returning the Number of Sections in the Table, 477
Reverse Geocoding, 707
Rotating the View into the Proper Orientation, 589
Sample Interface File, 73
Scheduling a Timer When the Application Starts, 777
Setting a Custom Height and Width for the Picker Components and Rows, 413-414
Setting a Default Selection, 416
Setting the Delegate During the Segue, 394, 408
Setting the Detail View Controller’s detailItem, 496
Setting the End of Background Processing, 779
Setting the Initial Scene’s Label to the Editor Scene’s Field, 363
Setting the Start of Background Processing, 779
Setting the Status Bar Appearance in preferredStatusBarStyle, 252, 742
Setting Up and Displaying the Image Picker, 658
Showing the Animal Chooser Scene, If Needed, 408
Showing the Date Chooser Scene, If Needed, 395
Silly Implementation of table View:cellForRowAtIndexPath, 466-467
Starting and Stopping the Animation in toggleAnimation, 248
Storing the Recently Received Location for Later Use, 748-749
Supporting All Interface Orientations, 577
Toggling the Animal Chooser’s Visibility Flag to NO, 408
Toggling the Date Chooser’s Visibility Flag to NO, 395
Typical Setup and Display of a Media Picker, 652
Updating doAlert to Register a Local Notification, 766-767
Updating the Counter, 778
Updating the Display in viewWillAppear:animated, 445
Updating the Display Using the Counter Values, 453
Updating the Initial recordAudio Method, 673
Updating the Settings in viewDidLoad, 520
Updating the Tab Bar Item’s Badge, 454
Updating the viewDidLoad Method to Set the Initial Display, 277
Updating viewDidLoad to Loop 2,000 Times, 823-824
Using prepareForSegue:sender to Grab the View Controllers, 340
Using the Motion Manager, 625
Watching for Orientation Changes, 629
Your First Code Exercise, 38-39
codec support, Apple Developer Program, 648-650
creating and connecting outlets and actions, 633-635
implementing application logic, 635-642
commands, File menu, New Project, 24
configuring devices for development, 13-16
connections
AllInCode project, planning, 577
editing, Quick Inspector, 161-162
Single View Application template (MVC), planning, 179-182
connectivity, iOS devices, 5
constraints
IB Auto Layout system, 145-148
controlHardware method, 637-638
controller delegate
controllers
detail view
fixing broken reference, 498-499
master view, implementing, 492-496
navigation, 423-428, 434-445, 456-457
split view, 499
creating relationships, 448-449
multiscene development, 422
MVC (Model-View-Controller), 170-172
relationships, 323
storyboards, adding supporting subclasses, 326-329
controls
expanding, Auto Layout, 567-572
convenience methods, 87
core application classes (Cocoa Touch), 111-113
Core Audio framework (Media layer), 105
Core Bluetooth framework (Core OS layer), 108
Core Data Core Competencies tutorial, 543
Core Foundation framework (Core Services layer), 107
Core Graphics framework (Media layer), 105
Core Location, 107, 727, 734-735, 754-755
creating instance, 739
implementing delegate, 739
locations
accuracy and update filter, 732
motion manager, initializing, 636-637
Core OS technology layer (iOS), 108-109
Core Services technology layer (iOS), 106-108
Core Text framework (Media layer), 105
CPUs (central processing units), monitoring, 828
createFlowerData method, 489, 491
createStory method, implementing, 224-225
Cupertino project, 735
adding background modes, 773
application logic, updating, 747-753
creating and connecting outlets, 737, 747
implementing application logic, 738-742
updating user interface, 745-746
custom images, buttons, setting, 215-218
building, 416
creating segues, 406
custom picker view, implementing, 409-416
outlets and actions, creating and connecting, 406-407
scene segue logic, implementing, 407-409
data detectors, 213
data models, MVC (Model-View-Controller), 172
data source outlets, FlowerColorTable project, connecting, 474-475
direct file system access, 510-514
file system storage, implementing, 535-543
data type classes (Cocoa Touch), 113-117
primitive, 85
date format strings, 397
date pickers, 378-379, 385-401
DateCalc project, 386
date calculation logic, implementing, 396-400
outlets and actions, creating and connecting, 391-392
scene segue logic, implementing, 393-396
debug navigator, Xcode debugger, 826-828
debugging applications, 809, 828-830
delegate protocols, picker view, 381-383
delegates
FlowerColorTable project, connecting, 474-475
segues, setting, 408
describeInteger method, 815
designing applications, MVC (Model-View-Controller), 167-168
Single View Application template, 173-190
detail scene, updating, 484-488
detail view controllers
fixing broken reference, 498-499
detailItem public property, 496-497
developers (iOS), becoming, 6-12
development provisioning profile, 13
Device command (Simulator), 62
Device iOS Version command (Simulator), 63
application resource constraints, 4
configuring for development, 13-16
connectivity, 5
devices, display and graphics, 2-3
input and feedback mechanisms, 5
orientations, setting, 53
direct file system access, data storage, 510-514
directives, 74
@implementation, 81
disabling
backgrounding, 763
editing of table cells, 495
editing of the UI, 495
interface rotation, 642
dismissals, popovers, responding to, 346-348
displaying
popovers manually, 346
displays
popovers, programming, 349-352
doAcceleration method, 640-641
doActionSheet method, 313
document outlines, IB (Interface Builder) storyboards, 133-137
documentation
downloading, 121
documentation system, Xcode, 121-125
documents
sharing, 125
downloading documentation, 121
editing
text field attributes, 205-207
tools, IB (Interface Builder), 141-145
email messages
Event Kit framework (Core Services layer), 107
Event Kit UI framework (Cocoa Touch), 104
events, multi-touch, generating, 61
External Accessory framework (Core OS layer), 108
feedback mechanisms, iOS devices, 5
fetches, background, 760
FieldButtonFun project, 197
actions, creating and connecting, 219
application logic, implementing, 224-225
keyboard hiding, implementing, 220-224
outlets, creating and connecting, 218-219
preparing button templates with slicing, 199-204
fields, alert views, adding to, 310-312
File menu commands, New Project, 24
file patches, obtaining, 512-513
file structure, Objective-C, 72-84
file system access, data storage, 510-514
file system storage, implementing, 535-543
files
Xcode projects, removing, 32
FlowerColorTable project, 471-481
application logic, implementing, 476-481
building, 481
connecting delegates and data source outlets, 474-475
FlowerWeb project
actions, creating and connecting, 271-274
application logic, implementing, 274-278
outlets, creating and connecting, 270-272
setting up, 263
Foundation framework (Core Services layer), 107
frameworks, 101
Cocoa Touch technology layer, 104-105
Game Kit framework (Cocoa Touch), 104
GenericViewController class, 440
gesture recognizers
tap gesture recognizer, 594-595
gesture recognizers
tap gesture recognizer, 594-595
long pressing, 594
multi-touch gesture recognition, 593-594
panning, 594
pinching, 594
rotating, 594
shaking, 594
swiping, 594
tapping, 594
application logic, implementing, 607-616
gesture recognizers, adding to views, 601-605
outlets and actions, creating and connecting, 605-607
Getting Started with Audio & Video, 689-691
GettingAttention project
action sheets, implementing, 313-316
actions and outlets, creating and connecting, 303-305
alert views, implementing, 305-312
GUI (graphical user interface), 131
headings, Core Location, obtaining, 732-734
HelloNoun project
actions, creating and connecting, 186-188
building, 190
implementing application logic, 189-190
outlets, creating and connecting, 184-188
planning properties and connections, 179-182
HelloXcode app, 26
adding new code files to, 28
code
managing properties, 51
removing files and resources, 32
hiding keyboard, 223, 363, 539
Home command (Simulator), 63
iAD framework (Cocoa Touch), 105
IB (Interface Builder), 131-132, 165
Accessibility options, 150-151
actions, connecting to, 159-161
editing connections, Quick Inspector, 161-162
object identity, 163
interfaces
customizing appearance, 148-153
views, adding objects to, 140-141
Identity Inspector (IB), 150-151
object identity, 163
if-then-else statements, 91-93
Image I/O framework (Media layer), 105
image views, 231
application logic, implementing, 246-252
implementing animated image views, 246-248
outlets and actions, creating and connecting, 242-246
images
adding to asset catalogs, 33-35
adding to buttons, 200
buttons, setting custom, 215-218
retina image assets, 35
imperative development, OOP (object-oriented programming), 68
implicit preferences, creating, 514-522
incrementCount method, 444
Information Property List Key Reference, 543
initialization, objects, 86-88
input mechanisms, iOS devices, 5
Inspector (Quick Help), 127-128
instance method, 70
instance variables, 70
versus properties, 439
instantiation, 70
Interface Builder (IB). See IB (Interface Builder)
interface classes (Cocoa Touch), 117-120
interfaces, 547-548. See also motion; orientation
BackgroundColor project, designing, 515
BackgroundDownload project, designing, 781
building responsive, Auto Layout, 552-575
buttons
adding, 212
setting custom images, 215-218
ColorTilt project, designing, 633-634
Cupertino project, updating, 745-746
customizing appearance, 148-153
CustomPicker project, designing, 404-406
DateCalc project, designing, 388-389
disabling rotation, 642
FieldButtonFun project, designing, 204-218
FlowerColorTable project, designing, 473-475
FlowerWeb project, designing, 263-270
Gestures project, designing, 599-601
GettingAttention project, designing, 302-303
HelloNoun project, designing, 182-185
ImageHop project, designing, 234-243
keyboard hiding, implementing, 220-224
LetsNavigate project, designing, 440-442
LetsTab project, designing, 449-451
MediaPlayground project, designing, 664-665
modal, 292
ModalEditor project, designing, 356-358
orientation changes, enabling, 577
Orientation project, designing, 627-628
PopoverEditor project, designing, 366
programatically defined, 574-583
ReturnMe project, designing, 523-525
rotation, 590
rotation events, 624
Scroller project, designing, 280-285
scrolling options, setting, 212
sliders, 230
SlowCount project, designing, 775
Survey project, designing, 535-537
Swapper project, designing, 584-585
switches, 258
text fields
attribute traits, 207
text views
Universal project, designing, 796-797
UniversalToo project, designing, 801-802
adding, 267
iOS
application life cycle, tracing, 109-110
application resource constraints, 4
configuring for development, 13-16
connectivity, 5
input and feedback mechanisms, 5
screen, accommodating different sizes, 3
technology layers, 103
version detection, 583
generating multi-touch events, 61
rotating device, 62
iPad
popovers, 315, 341-352, 364-370
displaying manually, 346
responding to dismissals, 346-348
screen, 2
split view controllers, 468-469
iPhone
screen, 2
keyboard hiding, 363
interfaces, implementing, 220-224
labels, 196
launching applications, Simulator, 59-60
LetsNavigate project
building, 445
outlets and actions, creating and connecting, 442-443
push segues, creating, 440-441
LetsTab project
application logic, implementing, 452-455
outlets and actions, creating and connecting, 450-452
libraries, IB (Interface Builder), Object Library, 137-139
life-cycle methods, background-aware, 761-762
listings. See code listings
local notifications
background processing, 758-759
LocateMe, 754
location manager (Core Location), 728-730
delegate, implementing, 740-742
instance, creating, 739
locations
accuracy and update filter, 732
adding constants, 736
Lock command (Simulator), 63
logic, 229
Address Book, implementing, 712-717
BackgroundColor project, implementing, 518-521
BackgroundDownload project, implementing, 782-784
ColorTilt project, implementing, 635-642
Cupertino project
FieldButtonFun project, implementing, 224-225
FlowerColorTable project, implementing, 476-481
FlowerWeb project, implementing, 274-278
Gestures project, implementing, 607-616
ImageHop project, implementing, 246-252
LetsTab project, implementing, 452-455
ModalEditor project, implementing, 362-363
Orientation project, implementing, 628-630
PopoverEditor project, implementing, 368-370
ReturnMe project, implementing, 532-534
Scroller project, implementing, 286-287
SlowCount project, implementing, 776-778
Survey project, implementing application logic, 539-543
Swapper project, implementing, 587-589
Universal project, implementing, 797-798
UniversalToo project, implementing, 802
long pressing, 594
long-running background tasks, completing, 773-780
long-running tasks, completing, 759-760
Manage UI framework (Cocoa Touch), 104
manually controlling modal segues, 333-334
manually displaying popover segues, 346
Maps, logic, implementing, 717-719
master scene, updating, 484-487
master view controllers, implementing, 492-496
Master-Detail Application template, 500
split view controllers, 471
media items, accessing, Media Player, 654
Media Player framework, 106, 648-654
accessing media items, 654
handling playback completion, 650-651
MediaPlayground project, 662-663
audio playback
audio recording, implementing, 670-674
Core Image filter, implementing, 681-682
Movie Player, implementing, 667-671
music libraries, accessing and playing, 683-688
outlets and actions, creating and connecting, 665-667
photo library, implementing, 677-681
memory management, Objective-C, 95-97
memory usage, monitoring, 828
applicationWillEnter Foreground, 764
background-aware application life cycle, 761-762
calculateDateDifference, 398-400
class, 70
convenience, 87
describeInteger, 815
doActionSheet, 313
incrementCount, 444
instance, 70
newBFF, 713
playAudio, 675
playMusic, 688
prepareForSegue:sender, 339-340
setBackgroundHueValue, 519-520
setIncrement, 251
setValuesFromPreferences, 533-534
showFromRect, 315
showResults, 541
tableView:titleForHeaderIn Section, 466-467
toggleFlowerDetail, 275
viewDidLoad, 275, 520-521, 815, 823-824
viewWillAppear:animated, 445
modal scene switches, programming, 336-339
creating, 358
modal user interfaces, 292
modal views, 323
ModalEditor project
actions and outlets, creating and connecting, 360-361
application logic, implementing, 362-363
building, 364
modal segues, creating, 358
Model-View-Controller (MVC). See MVC (Model-View-Controller)
acceleration, detecting, 631-643
Core Motion, reading acceleration, rotation, and attitude, 624-626
motion manager (Core Motion), 624-626, 643-644
motion sensing, Nintendo Wii, 619
handling playback completion, 650-651
MPMediaItem class, 648
MPMediaItemCollection class, 648
MPMediaPickerController class, 648
MPMoviePlayerController class, 648
MPMusicPlayerController class, 648-650
multibutton alerts, creating, 306-309
multiple targets, universal applications, 803-805
multiscene storyboards, 322-341
scenes
adding, 324
manually controlling modal segues, 333-334
programming modal scene switches, 336-339
view controllers, adding supporting subclasses, 326-329
multi-touch events, generating, Simulator, 61
multi-touch gesture recognition, 593-594
MVC (Model-View-Controller), 21, 167-168, 191-192
data models, 172
Single View Application template, 173-190
creating and connecting outlets and connections, 184-188
implementing application logic, 189-190
planning properties and connections, 179-182
structured application design, 168-169
navigating
navigation controllers, 423-428, 434-445, 456-457
navigation scenes, sharing data between, 428
navigators, Xcode debugger, 826-828
New Project command (File menu), 24
newBFF method, 713
Newsstand framework (Core Services layer), 107
NeXTSTEP, 103
Nintendo Wii, motion sensing, 619
NSDate class, 116
NSDecimalNumber class, 115-116
NSMutableDictionary class, 114-115
NSMutableString class, 113
NSObject class, 111
NSString class, 113
Objective-C, 20, 67, 71-72, 97-98
ARC (Automatic Reference Counting), 96-97
case sensitivity, 72
objects
OOP (object-oriented programming), 67-72
protocols, creating, 84
syntax, 72
typecasting, 88
Objective-C Phrasebook, 97
object-oriented programming (OOP). See OOP (object-oriented programming)
identifying, IB (Interface Builder), 163
self, 71
OOP (object-oriented programming)
classes, 69
categories, 70
imperative development, 68
instance method, 70
instance variables, 70
instantiation, 70
messages, 70
objects, 70
self, 71
parameters, 70
properties, 70
singletons, 69
subclasses, 69
superclasses, 69
variables, 70
OpenGL ES framework (Media layer), 106
OpenStep, 103
devices, setting, 53
interfaces, enabling changes, 577
preventing changes, 642
registering for updates, 628-629
rotation, swapping views on, 582-590
upside-down, disabling, 584
building, 631
creating and connecting outlet, 627
implementing application logic, 628-630
setting up, 627
outlets
BackgroundColor project, creating and connecting, 516-518
BestFriend project, creating and connecting, 711-712
ColorTilt project, creating and connecting, 633-635
Cupertino project, creating and connecting, 737, 747
CustomPicker project, creating and connecting, 406-407
DateCalc project, creating and connecting, 391-392
FieldButtonFun project, creating and connecting, 218-219
FlowerWeb project, creating and connecting, 270-272
Gestures project, creating and connecting, 605-607
GettingAttention project, creating and connecting, 303-305
HelloNoun project, creating and connecting, 184-188
IB (Interface Builder), 156-158
ImageHop project, creating and connecting, 242-246
LetsNavigate project, creating and connecting, 442-443
LetsTab project, creating and connecting, 450-452
ModalEditor project, creating and connecting, 360-361
Orientation project, creating and connecting, 627
PopoverEditor project, creating and connecting, 367-368
ReturnMe project, creating and connecting, 524
Scroller project, creating and connecting, 285-286
SlowCount project, creating and connecting, 776
Survey project, creating and connecting, 536-539
Swapper project, creating and connecting, 586
Universal project, creating and connecting, 796-797
UniversalToo project, creating and connecting, 802
panning, 594
parameters, 70
parent classes, 69
Pass Kit framework (Core Services layer), 107
passing data between scenes, 339-341
people picker, Address Book, 695-697
pickers, 373, 377-378, 417-418
pinching, 594
plain text fields, versus attributed, 207
playAudio method, 675
playback
AV Audio Player, handling completion, 656
Movie Player, handling completion, 650-651
playMusic method, 688
PopoverEditor project
application logic, implementing, 368-370
building, 370
creating popover segue, 366-367
designing interface, 366
outlets, creating and connecting, 367-368
dismissals, responding to, 346-348
displaying manually, 346
iPad, 315
pragma marks, code, Xcode projects, 41-42
preferences, implicit, creating, 514-522
Preferences and Settings Programming Guide, 543
prepareForSegue:sender method, 339-340
primitive data types, 85
programatically defined interfaces, 574-583
Programming in Objective-C 2.0, Third Edition, 97
enabling orientation changes, 577
planning properties and connections, 577
programming interface, 577-582
BackgroundColor, 544
creating and connecting outlets and actions, 516-518
designing interface, 515
implementing application logic, 518-521
setting up, 515
BackgroundDownload
building, 784
designing interface, 781
implementing application logic, 782-784
BestFriend
creating and connecting outlets and actions, 711-712
implementing email logic, 720-721
implementing social networking logic, 721-723
setting to white, 723
creating and connecting outlets and actions, 633-635
implementing application logic, 635-642
Cupertino, 735
adding background modes, 773
creating and connecting outlets, 737, 747
implementing application logic, 738-742
updating application logic, 747-753
updating user interface, 745-746
building, 416
creating and connecting outlets and actions, 406-407
creating segues, 406
implementing custom picker view, 409-416
implementing scene segue logic, 407-409
DateCalc, 386
creating and connecting outlets and actions, 391-392
implementing date calculation logic, 396-400
implementing scene segue logic, 393-396
FieldButtonFun, 197
creating and connecting outlets and actions, 218-219
implementing application logic, 224-225
implementing keyboard hiding, 220-224
preparing button templates with slicing, 199-204
building, 481
connecting delegates and data source outlets, 474-475
FlowerWeb
creating and connecting actions, 271-274
creating and connecting outlets, 270-272
implementing application logic, 274-278
setting up, 263
adding gesture recognizers to views, 601-605
creating and connecting outlets and actions, 605-607
implementing application logic, 607-616
GettingAttention
creating and connecting actions and outlets, 303-305
implementing action sheets, 313-316
implementing alert views, 305-312
IB (Interface Builder), opening, 154-155
creating and connecting outlets and actions, 242-246
implementing application logic, 246-252
LetsNavigate, 445
creating and connecting outlets and actions, 442-443
LetsTab
creating and connecting outlets and actions, 450-452
implementing application logic, 452-455
Master-Detail Application template, creating, 481-499
accessing and playing music library, 683-688
controlling audio playback, 675-677
creating and connecting outlets and actions, 665-667
implementing audio playback, 674-675
implementing audio recording, 670-674
implementing Core Image filter, 681-682
implementing Movie Player, 667-671
implementing photo library, 677-681
ModalEditor
building, 364
creating and connecting actions and outlets, 360-361
creating modal segues, 358
implementing application logic, 362-363
Orientation
building, 631
creating and connecting outlet, 627
implementing application logic, 628-630
setting up, 627
PopoverEditor
building, 370
creating and connecting outlets, 367-368
creating popover segue, 366-367
designing interface, 366
implementing application logic, 368-370
ReturnMe, 544
creating and connecting, 524
creating settings bundles, 524-531
implementing application logic, 532-534
Scroller
creating and connecting outlets and actions, 285-286
implementing application logic, 286-287
setting up, 279
SlowCount
building, 780
creating and connecting outlets, 776
designing interface, 775
enabling background task processing, 778-780
implementing application logic, 776-778
Survey, 544
creating and connecting outlets and actions, 536-539
implementing application logic, 539-543
setting up, 535
Swapper
building, 590
creating and connecting outlets, 586
implementing application logic, 587-589
Universal
building, 799
creating and connecting outlets, 796-797
implementing application logic, 797-798
setting up, 796
UniversalToo, 803
creating and connecting outlets, 802
implementing application logic, 802
Xcode
adding new code files to, 28
managing properties, 51
removing files and resources, 32
properties, 70
AllInCode project, planning, 577
versus instance variables, 439
respecting point of, 771
Single View Application template (MVC), planning, 179-182
creating, 84
pseudo preferences, 506
push segues, creating, 440-441
Quartz Core framework (Media layer), 106
Quick Inspector (IB), editing connections, 161-162
Quick Look framework (Core Services layer), 107
range attributes
relationships
view controllers, 323
resizable interfaces, designing, 550-552
resources, Xcode projects
removing, 32
responsive interfaces, 547-548
building, Auto Layout, 552-575
designing rotatable and resizeable, 550-552
Retina display, 2
retina image assets, 35
ReturnMe project, 544
application logic, implementing, 532-534
outlets, creating and connecting, 524
settings bundles, creating, 524-531
AV Foundation framework, 655-657
Media Player framework, 648-654
rotatable interfaces, designing, 550-552
rotation, 594
interfaces, 590
scenes, 323
exits, 323
modal, programming switches, 336-339
multiscene storyboards, adding to, 324
navigation, sharing data between, 428
segues, 323
controlling modal manually, 333-334
implementing logic, 393-396, 407-409
tab bar, sharing data between, 430-434
Scroller project
actions and outlets, creating and connecting, 285-286
application logic, implementing, 286-287
setting up, 279
scrolling options, interfaces, setting, 212
SDK (software development kit), 6, 321
search navigator (Xcode), 40-41
searching documentation, 121-122
Security framework (Core OS layer), 108
segmented controls, 258-259, 288-289
creating, 358
popovers, creating, 343-346, 366-367
scenes
controlling modal manually, 333-334
setting delegates, 408
selection handles (IB), 142-144
services
Address Book, 693-697, 724-725
posting to social networking sites, 700-702
setBackgroundHueValue method, 519-520
setIncrement method, 251
settings bundles
setValuesFromPreferences method, 533-534
Shake Gesture command (Simulator), 63
shaking devices, 594
showFromRect method, 315
showResults method, 541
Simulate Hardware Keyboard command (Simulator), 63
Simulate Memory Warning command (Simulator), 63
generating multi-touch events, 61
rotating device, 62
Single View Application template, table views, 471-481
Single View Application template (MVC), 173-190
creating and connecting outlets and connections, 184-188
implementing application logic, 189-190
planning properties and connections, 179-182
singletons, 69
slicing, preparing button templates, 199-204
setting range attributes, 237-239
SlowCount project
background task processing, enabling, 778-780
building, 780
creating and connecting outlets, 776
designing interface, 775
implementing application logic, 776-778
Social framework (Core Services layer), 108
social networking platforms, posting to, 700-702
software development kit (SDK), 6, 321
split view controllers, 468-469, 499
Master-Detail Application template, 471
state preservation, 506
statements
status bar, setting display, 54-58
applications, adding to, 239-240
range attributes, setting, 240-241
stepping through code, 820-822
Store Kit framework (Core Services layer), 108
storyboards, 323, 370-371, 421
IB (Interface Builder), 133-137
adding scenes, 324
manually controlling modal segues, 333-334
passing data between scenes, 339-341
programming modal scene switches, 336-339
navigation controllers, 425-428
view controllers, adding supporting subclasses, 326-329
strings, date format, 397
structured application design, MVC (Model-View-Controller), 168-169
styled buttons, adding, 212
subclasses, 69
superclasses, 69
Survey project, 544
application logic, implementing, 539-543
outlets and actions, creating and connecting, 536-539
setting up, 535
suspension, background, 758
Swapper project
application logic, implementing, 587-589
building, 590
creating and connecting outlets, 586
swiping, 594
modal scene, programming, 336-339
setting default state, 267
symbol navigator (Xcode), 37
syntax, Objective-C expressions, 91-95
System Configuration framework (Core Services layer), 108
System framework (Core OS layer), 109
system settings, implementing, 522-534
System Sound Services, 298-300, 647
tab bar controllers, 429-434, 445-457
creating relationships, 448-449
tab bar scenes, sharing data between, 430-434
tabbed editing, Xcode, 44
table views, 459, 471-481, 499
attributes, setting, 462
cells, 460
disabling editing, 495
setting prototype attributes, 463-464
tableView:titleForHeaderInSection method, 466-467
tap gesture recognizer, 594-595
tapping, 594
targets, multiple, universal applications, 803-805
tasks
completing long-running, 773-780
long-running, completion, 759-760
task-specific background processing, 759, 768-773
technology layers (iOS), 103
templates
button, preparing with slicing, 199-204
Master-Detail Application, 500
universal applications, 791-792
attributed versus plain, 207-209
attributes
traits, 207
Toggle In-Call Status Bar command (Simulator), 63
toggleAnimation method, 248-249
toggleFlowerDetail method, 275
touch, multi-touch gesture recognition, 593-594
tracing
application life cycle, 109-110
NSLog function, 810
TV Out command (Simulator), 63
typecasting, 88
UI Framework, Address Book, 694-695
UIApplication class, 111
UIBarButtonItem class, 375
UIButton class, 117, 195, 199-204, 231
UIControl class, 112
UIDatePicker class, 119, 377-378, 417
UIDevice class, requesting orientation notifications through, 623-624
UIGestureRecognizer class, 617
UIImagePickerController class, 648
UIImagePickerControllerDelegate protocol, 659-660
UIKit framework (Cocoa Touch), 104
UILongPressGestureRecognizer class, 594, 617
UIPanGestureRecognizer class, 594, 617
UIPicker class, 119
UIPinchGestureRecognizer class, 594
UIPopoverController class, 120, 347-348, 373
UIResponder class, 112
UIRotationGestureRecognizer class, 594
UIScrollView class, 261, 279, 288
UIScrollViewDelegate class, 288
UISegmentedControl class, 118, 259, 288
UISlider class, 118, 230-231, 252
UIStepper, 252
UISwipeGestureRecognizer class, 594
UITapGestureRecognizer class, 594
UITextFieldDelegate class, 226
UITextViewDelegate class, 226
UIViewController class, 113
UIWebView class, 288
UIWindow class, 112
universal applications, 789, 805
Universal project
application logic, implementing, 797-798
building, 799
outlets, creating and connecting, 796-797
setting up, 796
UniversalToo project
application logic, implementing, 802
building, 803
outlets, creating and connecting, 802
unwind segues, scenes, 323, 334-336
updates
orientation, registering for, 628-629
upside-down orientation, disabling, 584
multibutton, creating, 306-309
System Sound Services, 298-300, 316-318
user defaults, data storage, 507-508
implementation, 197
labels, 196
text views, 196
user interfaces. See interfaces
user locations
accuracy and update filter, 732
adding constants, 736
variable list, Xcode debugger, accessing, 823-824
variables, 70
instance, 70
version detection, iOS, 583
vibrations, alerts, 317
view controllers, 323, 421-422
multiscene development, 422
MVC (Model-View-Controller), 170-172
relationships, 323
storyboards, adding supporting subclasses, 326-329
ViewController class, 436, 446
viewDidLoad method, 275, 520-521, 815, 823-824
views, 323
button press response, 309-310
Cupertino project, designing, 736-738
gesture recognizers, adding to, 601-605
image, 231
modal, 323
MVC (Model-View-Controller), 169-170
rotation, swapping on, 582-590
split view controllers, 468-469
Master-Detail Application template, 471
table views, 459
adding, 267
viewWillAppear:animated method, 445
adding, 267
animation resources, adding, 233
accessing variable list, 823-824
steeping through code, 820-822
devices, setting orientations, 53
generating multi-touch events, 61
managing snapshots, 45
MVC (Model-View-Controller), implementation, 169-172
projects
adding new code files to, 28
managing properties, 51
removing files and resources, 32
setting status bar display, 54-58
Single View Application option, 174
tabbed editing, 44
writing code with, 188
Xcode 4 Unleashed, 97