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

Symbols

[top]

#import directive, 73-74, 81

sharing properties and methods, 329-330

@class directive, sharing properties and methods, 329-330

@implementation directive, 81

@import directive, 73-74

@interface directive, 74-75

@property directive, 76-78, 171

A

[top]

Accelerate framework (Core OS layer), 108

acceleration

detecting, 631-643

handling data, 640-641

reading, Core Motion, 624-626

accelerometers, 620-622

Accessibility options, IB (Interface Builder), 150-151

Accounts framework (Core Services layer), 106

action sheets, 295-298

button press response, 314-316

implementing, 313-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

framework, 104, 106, 697

implementing logic, 712-717

people picker delegate, 695-697

UI Framework, 694-695

alerts, 291-319

action sheets, implementing, 313-316

multibutton, creating, 306-309

System Sound Services, 298-300, 316-318

views, 292-295

action sheets, 295-298

button press response, 309-310

fields, 310-312

implementing, 305-312

AllInCode project, 577-583

building, 582-583

interface

enabling orientation changes, 577

programming, 577-582

planning properties and connections, 577

allocation, objects, 86-88

animations

loading, 247-248

resources, adding, 233

speed

incrementing, 251

setting, 249-251

starting and stopping, 248-249

annotations, maps, 703-705

Apple, codec support, 648-650

Apple Developer Program, 6-9

development provisioning profile, 13

creating, 12-16

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

implementing, 738-742

updating, 747-753

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

Maps, implementing, 717-719

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

backgrounding, 757-762

disabling, 763

life-cycle methods, 761-762

types, 758-760

data storage, 503-505

direct file system access, 510-514

settings bundles, 508-510

user defaults, 507-508

debugging, 809, 828-830

Xcode debugger, 813-828

HelloXcode, 26

adding new code files to, 28

adding resources to, 28-32

building, 46-51

code completion, 38-40

managing properties, 51

navigating, 28-30

navigating code, 35-37

pragma marks, 41-42

removing files and resources, 32

searching code, 40-41

launching, Simulator, 59-60

life cycle, tracing, 109-110

logic, implementing, 189-190

MVC (Model-View-Controller), 167-168

Single View Application template, 173-190

structured design, 168-169

Xcode implementation, 169-172

running first, 17-18

sliders, adding, 236-238

steppers, adding, 239-240

suspension, 758

tracing, 809

NSLog function, 810

universal, 789, 805

creating, 794-803

development, 789-794

multiple targets, 804-805

setup changes, 791-794

templates, 791-792

applicationWillEnterForeground method, 764

apps. See applications

ARC (Automatic Reference Counting), 662

Objective-C, 96-97

Archives and Serializations Programming Guide for Cocoa, 543

asset catalogs (Xcode), 32-35

assistant editor (Xcode), 42-44

attitude

displaying data, 639-640

reading, Core Motion, 624-626

attributed text fields, versus plain, 207-209

attributes

bar button items, 376-377

buttons, editing, 214-215

date pickers, 378-379

tables, setting, 462

text fields

editing, 205-207

traits, 207

text views, editing, 210-212

Attributes Inspector (IB), 149-150

audio, Cupertino project, preparing for, 768-773

Auto Layout, 548, 550, 597-598

building responsive interfaces, 552-575

constraints, 552-562

centering, 562-565

Constraints object, navigating, 554-562

expanding controls, 567-572

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

implementing, 674-675

AV Audio Recorder, 656-657

implementing, 670-674

AV Foundation framework, 105, 655-657

AV Audio Player, 655

controlling playback, 675-677

handling playback completion, 656

implementing, 674-675

AV Audio Recorder, 656-657

implementing, 670-674

B

[top]

background fetches, 760

performing, 780-784

background processing

local notifications, 758-759

implementing, 765-767

task-specific, 759, 768-773

background suspension, 758

handling, 764-765

background tasks, 785-786

completing long-running, 773-780

processing, enabling, 778-780

BackgroundColor project, 544

application logic, implementing, 518-521

building, 521-522

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

setting up, 780-781

backgrounding, 757-762

disabling, 763

life-cycle methods, 761-762

types, 758-760

bar button items, 375-376

attributes, 376-377

navigation controllers, 424-425

BestFriend project

Address Book, implementing logic, 712-717

building, 723-724

designing interface, 745

email logic, implementing, 720-721

Maps, implementing logic, 717-719

outlets and actions, creating and connecting, 711-712

setting up, 708-709

social networking logic, implementing, 721-723

status bar, setting to white, 723

blocks, 90-91

blur effect (iOS 7), adding, 743

blurring effect, 278, 525

bookmarks, setting, 124-125

breakpoint navigator, Xcode debugger, 826-828

breakpoints, setting, 816-818

browsing, documentation, 123-124

building applications, Xcode, 46-51

button templates, preparing with slicing, 199-204

buttons, 195-196, 226-227

action sheets, button press response, 314-316

alert views, button press response, 309-310

attributes, editing, 214-215

bar button items, 375-376

attributes, 376-377

images

adding to, 200

setting custom, 215-218

styled, adding, 212

templates, preparing with slicing, 199-204

C

[top]

calculateDateDifference method, 398-400

case sensitivity, Objective-C, 72

Castillo, Cesar Pinto, 275

categories

classes, 70

defining, 82-83

cells, tables, 460

creating, 493-494

disabling editing, 495

centering constraints, Auto Layout, 562-565

CFNetwork framework (Core Services layer), 106

chooseImage method, 677-678

class methods, 70

classes, 69

categories, 70

Cocoa Touch, 110-111

core application, 111-113

data type, 113-117

interface, 117-120

GenericViewController, 440

MPMediaItem, 648

MPMediaItemCollection, 648

MPMediaPickerController, 648

MPMoviePlayerController, 648

MPMusicPlayerController, 648-650

NSArray, 113-114

NSDate, 116

NSDecimalNumber, 115-116

NSDictionary, 114-115

NSMutableArray, 113-114

NSMutableDictionary, 114-115

NSMutableString, 113

NSNumber, 115-116

NSObject, 111

NSString, 113

NSURL, 116-117

singletons, 69

subclasses, 69

superclasses, 69

UIActionSheet, 295-298

UIAlertView, 292-295

UIApplication, 111

UIBarButtonItem, 375

UIButton, 117, 195, 199-204, 231

UIControl, 112

UIDatePicker, 119, 377-378, 417

UIDevice, 623-624

UIGestureRecognizer, 617

UIImagePickerController, 648

UIImageView, 231, 681

UILabel, 117, 196, 231

UILongPressGesture Recognizer, 594, 617

UIPanGestureRecognizer, 594, 617

UIPicker, 119

UIPickerView, 377, 417

UIPinchGestureRecognizer, 594

UIPopoverController, 120, 347-348, 373

UIResponder, 112

UIRotationGestureRecognizer, 594

UIScrollView, 261, 279, 288

UIScrollViewDelegate, 288

UISegmentedControl, 118, 259, 288

UISlider, 118, 230-231, 252

UIStepper, 118, 230-231, 252

UISwipeGestureRecognizer, 594

UISwitch, 118, 258, 288

UITapGestureRecognizer, 594

UITextField, 119, 196

UITextFieldDelegate, 226

UITextView, 119, 196

UITextViewDelegate, 226

UIView, 112, 259

UIViewController, 113

UIWebView, 288

UIWindow, 112

ViewController, 436, 446

Cocoa, versus Cocoa Touch, 103

Cocoa Touch, 20, 101-103, 129

application life cycle, tracing, 109-110

classes, 110-111

core application, 111-113

data type, 113-117

interface, 117-120

versus Cocoa, 103

functionality, 102-103

iOS technology layers, 104-105

code

HelloXcode app

adding pragma marks, 41-42

searching, 40-41

loops, 93-95

setting breakpoints, 816-818

stepping through, 820-822

writing

IB (Interface Builder), 162-163

Xcode, 188

code files, Xcode projects, adding to, 28-32

code listings

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

ColorTilt project, 631-632

building, 642-643

creating and connecting outlets and actions, 633-635

designing interface, 633-634

implementing application logic, 635-642

setting up, 632-633

commands, File menu, New Project, 24

compass, 744-753

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

Auto Layout, 552-562

centering, 562-565

IB Auto Layout system, 145-148

controlHardware method, 637-638

controller delegate

Image Picker, 659-660

Media Picker, 652-653

controllers

detail view

fixing broken reference, 498-499

implementing, 496-498

master view, implementing, 492-496

navigation, 423-428, 434-445, 456-457

bar button items, 424-425

storyboards, 425-428

segmented, 288-289

split view, 499

tab bar, 429-434, 445-457

creating relationships, 448-449

storyboards, 430-434

view, 323, 421-422

multiscene development, 422

MVC (Model-View-Controller), 170-172

relationships, 323

storyboards, adding supporting subclasses, 326-329

controls

expanding, Auto Layout, 567-572

segmented, 258-259

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, 106, 543

Core Data Core Competencies tutorial, 543

Core Foundation framework (Core Services layer), 107

Core Graphics framework (Media layer), 105

Core Image, 105, 660-662

filters, 660-661, 681-682

Core Location, 107, 727, 734-735, 754-755

headings, obtaining, 732-734

location manager, 728-730

creating instance, 739

implementing delegate, 739

preparing, 738-739

locations

accuracy and update filter, 732

handling errors, 730-731

obtaining, 727-732

Core Motion, 107, 643-644

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

building, 742-743, 753

creating and connecting outlets, 737, 747

designing view, 736-738

implementing application logic, 738-742

preparing for audio, 768-773

setting up, 735-736, 744-745

updating user interface, 745-746

custom images, buttons, setting, 215-218

custom pickers, 401-416

CustomPicker project, 401-402

building, 416

creating segues, 406

custom picker view, implementing, 409-416

designing interface, 404-406

outlets and actions, creating and connecting, 406-407

scene segue logic, implementing, 407-409

setting up, 402-403

D

[top]

data detectors, 213

data models, MVC (Model-View-Controller), 172

data source outlets, FlowerColorTable project, connecting, 474-475

data storage, 503-505

direct file system access, 510-514

file system storage, implementing, 535-543

locations, 511-512

settings bundles, 508-510

user defaults, 507-508

data type classes (Cocoa Touch), 113-117

data types, 85-86

primitive, 85

date format strings, 397

date pickers, 378-379, 385-401

DateCalc project, 386

building, 400-401

creating segue, 389-391

date calculation logic, implementing, 396-400

designing interface, 388-389

outlets and actions, creating and connecting, 391-392

scene segue logic, implementing, 393-396

setting up, 386-388

debug navigator, Xcode debugger, 826-828

debugging applications, 809, 828-830

Xcode debugger, 813-828

declaring variables, 84-86

defining methods, 78-79

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

structured design, 168-169

Xcode implementation, 169-172

detail scene, updating, 484-488

detail view controllers

fixing broken reference, 498-499

implementing, 496-498

detailItem public property, 496-497

developers (iOS), becoming, 6-12

development provisioning profile, 13

creating, 12-16

Device command (Simulator), 62

Device iOS Version command (Simulator), 63

devices (iOS), 1-2

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

#import, 73-74, 81

@implementation, 81

@import, 73-74

@interface, 74-75

@property, 76-78, 171

disabling

backgrounding, 763

editing of table cells, 495

editing of the UI, 495

interface rotation, 642

dismissals, popovers, responding to, 346-348

displaying

media picker, 685-686

popovers manually, 346

displays

iOS devices, 2-3

popovers, programming, 349-352

doAcceleration method, 640-641

doActionSheet method, 313

doAlert method, 305-306, 311

doAttitude method, 639-640

document outlines, IB (Interface Builder) storyboards, 133-137

documentation

browsing, 123-124

downloading, 121

searching, 121-122

documentation system, Xcode, 121-125

documents

navigating, 124-125

sharing, 125

doRotation method, 641-642

downloading documentation, 121

E

[top]

editing

button attributes, 214-215

text field attributes, 205-207

text view attributes, 210-212

tools, IB (Interface Builder), 141-145

email messages

composing, 698-700

logic, implementing, 720-721

Event Kit framework (Core Services layer), 107

Event Kit UI framework (Cocoa Touch), 104

events, multi-touch, generating, 61

exits, scenes, 323, 334-336

expressions, 91-95

External Accessory framework (Core OS layer), 108

F

[top]

Facebook, posting to, 701-702

feedback mechanisms, iOS devices, 5

fetches, background, 760

performing, 780-784

FieldButtonFun project, 197

actions, creating and connecting, 219

application logic, implementing, 224-225

building, 225-226

designing interface, 204-218

keyboard hiding, implementing, 220-224

outlets, creating and connecting, 218-219

preparing button templates with slicing, 199-204

setting up, 198-199

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

header, 73-80

ending, 79-80

implementation, 79-82

Xcode projects, removing, 32

filters, Core Image, 660-661

FlowerColorTable project, 471-481

application logic, implementing, 476-481

building, 481

connecting delegates and data source outlets, 474-475

designing interface, 473-475

FlowerWeb project

actions, creating and connecting, 271-274

application logic, implementing, 274-278

building, 278-279

designing interface, 263-270

outlets, creating and connecting, 270-272

setting up, 263

Foundation framework (Core Services layer), 107

frameworks, 101

Cocoa Touch technology layer, 104-105

Media Player, 648-654

G

[top]

Game Kit framework (Cocoa Touch), 104

GenericViewController class, 440

geocoding, 705-708

gesture recognizers

adding, 594-595

adding to views, 601-605

tap gesture recognizer, 594-595

using, 596-617

gestures, 593, 617

gesture recognizers

adding, 594-595

adding to views, 601-605

tap gesture recognizer, 594-595

using, 596-617

long pressing, 594

multi-touch gesture recognition, 593-594

panning, 594

pinching, 594

rotating, 594

shaking, 594

swiping, 594

tapping, 594

Gestures project, 596-598

application logic, implementing, 607-616

building, 607-616

designing interface, 599-601

gesture recognizers, adding to views, 601-605

outlets and actions, creating and connecting, 605-607

setting up, 598-599

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

designing interface, 302-303

setting up, 301-302

graphics, iOS devices, 2-3

GUI (graphical user interface), 131

guides (IB), 141-142

gyroscopes, 622-623

H

[top]

hardware, motion, 619-623

accelerometers, 620-622

gyroscopes, 622-623

header files, 73-80

ending, 79-80

headings, Core Location, obtaining, 732-734

HelloNoun project

actions, creating and connecting, 186-188

building, 190

designing interface, 182-185

implementing application logic, 189-190

outlets, creating and connecting, 184-188

planning properties and connections, 179-182

setting up, 174-179

HelloXcode app, 26

adding new code files to, 28

adding resources to, 28-32

assistant editor, 42-44

building, 46-51

code

completion, 38-40

navigating, 35-37

pragma marks, 41-42

searching, 40-41

managing properties, 51

navigating, 28-30

removing files and resources, 32

hiding keyboard, 223, 363, 539

Home command (Simulator), 63

I

[top]

iAD framework (Cocoa Touch), 105

IB (Interface Builder), 131-132, 165

Accessibility options, 150-151

actions, connecting to, 159-161

Attributes Inspector, 149-150

Auto Layout system, 145-148

editing connections, Quick Inspector, 161-162

editing tools, 141-145

Identity Inspector, 150-151

object identity, 163

interfaces

creating, 137-148

customizing appearance, 148-153

previewing, 151-153

Object Library, 137-139

outlets, 156-158

projects, opening, 154-155

resources, 164-165

storyboard, 133-137

views, adding objects to, 140-141

writing code with, 162-163

Identity Inspector (IB), 150-151

object identity, 163

if-then-else statements, 91-93

Image I/O framework (Media layer), 105

Image Picker, 657-660

controller delegate, 659-660

implementing, 677-681

image views, 231

ImageHop project, 231-253

application logic, implementing, 246-252

building, 252-253

designing interface, 234-243

implementing animated image views, 246-248

outlets and actions, creating and connecting, 242-246

setting up, 233-234

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

implementation files, 79-82

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

installation, Xcode, 9-12

instance method, 70

instance variables, 70

versus properties, 439

instantiation, 70

Interface Builder (IB). See IB (Interface Builder)

interface classes (Cocoa Touch), 117-120

interface files, 73-80

ending, 79-80

interfaces, 547-548. See also motion; orientation

BackgroundColor project, designing, 515

BackgroundDownload project, designing, 781

building responsive, Auto Layout, 552-575

buttons

adding, 212

editing attributes, 214-215

setting custom images, 215-218

ColorTilt project, designing, 633-634

controls, segmented, 258-259

creating, 137-148

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

iPad, tweaking, 484-486

iPhone, tweaking, 486-488

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

pickers, 373, 377-378

custom, 401-416

date, 378-379, 385-401

views, 379-385

PopoverEditor project, designing, 366

previewing, 151-153

programatically defined, 574-583

programming, 577-582

resizable, designing, 550-552

ReturnMe project, designing, 523-525

rotatable, designing, 550-552

rotation, 590

enabling, 548-549

swapping views on, 582-590

rotation events, 624

Scroller project, designing, 280-285

scrolling options, setting, 212

scrolling views, 261, 279-288

sliders, 230

SlowCount project, designing, 775

steppers, 230-231

Survey project, designing, 535-537

Swapper project, designing, 584-585

switches, 258

adding, 266-267

text fields

adding, 204-205

attribute traits, 207

editing attributes, 205-207

text views

adding, 209-210

editing attributes, 210-212

toolbars, 373-377

bar button items, 375-377

Universal project, designing, 796-797

UniversalToo project, designing, 801-802

web views, 259-261

adding, 267

Xcode, 27-28

iOS

application life cycle, tracing, 109-110

devices, 1-2

application resource constraints, 4

configuring for development, 13-16

connectivity, 5

display and graphics, 2-3

input and feedback mechanisms, 5

screen, accommodating different sizes, 3

technology layers, 103

Cocoa Touch, 104-105

Core OS, 108-109

Core Services, 106-108

Media, 105-106

version detection, 583

iOS Simulator, 23, 58-63

generating multi-touch events, 61

Hardware menu commands, 62-64

launching applications, 59-60

rotating device, 62

iPad

interface, tweaking, 484-486

popovers, 315, 341-352, 364-370

creating segues, 343-346

displaying manually, 346

preparing, 342-343

programming displays, 349-352

responding to dismissals, 346-348

screen, 2

split view controllers, 468-469

targets, 804-805

iPhone

interface, tweaking, 486-488

screen, 2

targets, 804-805

K-L

[top]

keyboard hiding, 363

interfaces, implementing, 220-224

labels, 196

launch images, setting, 57-58

launching applications, Simulator, 59-60

LetsNavigate project

building, 445

designing interface, 440-442

outlets and actions, creating and connecting, 442-443

push segues, creating, 440-441

setting up, 436-440

LetsTab project

application logic, implementing, 452-455

building, 455-456

designing interface, 449-451

outlets and actions, creating and connecting, 450-452

setting up, 446-448

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

implementing, 765-767

LocateMe, 754

location manager (Core Location), 728-730

delegate, implementing, 740-742

instance, creating, 739

preparing, 738-739

locations

accuracy and update filter, 732

adding constants, 736

compass, 744-753

data storage, 511-512

handling errors, 730-731

obtaining, 727-732

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

implementing, 738-742

updating, 747-753

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

Maps, implementing, 717-719

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

loops, 93-95

M

[top]

magnetic compass, 744-753

Mail, 698-700

Manage UI framework (Cocoa Touch), 104

manually controlling modal segues, 333-334

manually displaying popover segues, 346

Map Kit, 104, 724-725, 727

mapping, 702-708

annotations, 703-705

geocoding, 705-708

Maps, logic, implementing, 717-719

master scene, updating, 484-487

master view controllers, implementing, 492-496

Master-Detail Application template, 500

creating, 481-499

split view controllers, 471

media items, accessing, Media Player, 654

Media layer (iOS), 105-106

Media Picker, 651-652

controller delegate, 652-653

displaying, 685-686

preparing, 683-684

Media Player framework, 106, 648-654

accessing media items, 654

Media Picker, 651-652

controller delegate, 652-653

Movie Player, 648-650

handling playback completion, 650-651

implementing, 667-671

Music Player, 653-654

MediaPlayground project, 662-663

audio playback

controlling, 675-677

implementing, 674-675

audio recording, implementing, 670-674

Core Image filter, implementing, 681-682

designing interface, 664-665

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

setting up, 663-664

memory management, Objective-C, 95-97

memory usage, monitoring, 828

messages, 70, 88-91

nested messaging, 89-90

methods, 88-91

applicationWillEnter Foreground, 764

background-aware application life cycle, 761-762

calculateDateDifference, 398-400

chooseImage, 677-678

class, 70

controlHardware, 637-638

convenience, 87

createFlowerData, 489, 491

createStory, 224-225

defining, 78-79

describeInteger, 815

doAcceleration, 640-641

doActionSheet, 313

doAlert, 305-306

doAttitude, 639-640

doRotation, 641-642

implementing, 81-82

incrementCount, 444

instance, 70

newBFF, 713

playAudio, 675

playMusic, 688

prepareForSegue:sender, 339-340

recordAudio, 673, 676

setBackgroundHueValue, 519-520

setIncrement, 251

setSpeed, 249-251

setValuesFromPreferences, 533-534

showFromRect, 315

showResults, 541

storeSurvey, 539-540

tableView:titleForHeaderIn Section, 466-467

toggleAnimation, 248-249

toggleFlowerDetail, 275

viewDidLoad, 275, 520-521, 815, 823-824

viewWillAppear:animated, 445

modal scene switches, programming, 336-339

modal segues, 352-364

controlling manually, 333-334

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

designing interface, 356-358

modal segues, creating, 358

setting up, 352-356

Model-View-Controller (MVC). See MVC (Model-View-Controller)

motion

acceleration, detecting, 631-643

accessing data, 624-626

Core Motion, reading acceleration, rotation, and attitude, 624-626

hardware, 619-623

accelerometers, 620-622

gyroscopes, 622-623

managing updates, 637-638

methods, preparing, 638-639

rotation, detecting, 631-643

tilt, detecting, 631-643

motion manager (Core Motion), 624-626, 643-644

initializing, 636-637

motion sensing, Nintendo Wii, 619

Movie Player, 648-650

handling playback completion, 650-651

implementing, 667-671

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

preparing, 324-330

scenes

adding, 324

configuring segues, 332-333

creating segues, 330-333

manually controlling modal segues, 333-334

naming, 326-327

passing data between, 339-341

programming modal scene switches, 336-339

unwind segues, 334-336

view controllers, adding supporting subclasses, 326-329

multi-touch events, generating, Simulator, 61

multi-touch gesture recognition, 593-594

Music Player, 653-654

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

designing interface, 182-185

implementing application logic, 189-190

planning properties and connections, 179-182

setting up project, 174-179

structured application design, 168-169

view controllers, 170-172

views, 169-170

Xcode implementation, 169-172

N

[top]

naming scenes, 326-327

navigating

documents, 124-125

Xcode projects, 28-30

navigation bars, 424-425

navigation controllers, 423-428, 434-445, 456-457

bar button items, 424-425

storyboards, 425-428

navigation scenes, sharing data between, 428

navigators, Xcode debugger, 826-828

nested messaging, 89-90

New Project command (File menu), 24

newBFF method, 713

Newsstand framework (Core Services layer), 107

NeXTSTEP, 103

Nintendo Wii, motion sensing, 619

NSArray class, 113-114

NSDate class, 116

NSDecimalNumber class, 115-116

NSDictionary class, 114-115

NSLog function, 810-812

NSMutableArray class, 113-114

NSMutableDictionary class, 114-115

NSMutableString class, 113

NSNumber class, 115-116

NSObject class, 111

NSString class, 113

NSURL class, 116-117

O

[top]

Object Library (IB), 137-139

Objective-C, 20, 67, 71-72, 97-98

ARC (Automatic Reference Counting), 96-97

blocks, 90-91

case sensitivity, 72

categories, defining, 82-83

decision making, 91-95

expressions, 91-95

file structure, 72-84

header files, 73-80

implementation files, 79-82

loops, 93-95

memory management, 95-97

messages, 88-91

methods, 88-91

objects

allocating, 86-88

initializing, 86-88

OOP (object-oriented programming), 67-72

protocols, creating, 84

syntax, 72

typecasting, 88

variables, declaring, 84-86

Objective-C Phrasebook, 97

object-oriented programming (OOP). See OOP (object-oriented programming)

objects, 70, 489

allocating, 86-88

identifying, IB (Interface Builder), 163

initializing, 86-88

self, 71

OOP (object-oriented programming)

classes, 69

categories, 70

imperative development, 68

instance method, 70

instance variables, 70

instantiation, 70

messages, 70

Objective-C, 67-72

objects, 70

self, 71

parameters, 70

properties, 70

singletons, 69

subclasses, 69

superclasses, 69

variables, 70

OpenGL ES framework (Media layer), 106

OpenStep, 103

orientation

accessing data, 622-624

devices, setting, 53

interfaces, enabling changes, 577

preventing changes, 642

registering for updates, 628-629

rotation, swapping views on, 582-590

sensing, 626-631

upside-down, disabling, 584

Orientation project, 626-631

building, 631

creating and connecting outlet, 627

designing interface, 627-628

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

P

[top]

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

custom, 401-416

date, 378-379, 385-401

Image Picker, 657-660

controller delegate, 659-660

implementing, 677-681

Media Picker, 651-652

controller delegate, 652-653

displaying, 685-686

preparing, 683-684

views, 379-385

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

pointers, 85-86

PopoverEditor project

application logic, implementing, 368-370

building, 370

creating popover segue, 366-367

designing interface, 366

outlets, creating and connecting, 367-368

setting up, 365-366

popovers, 341-352, 364-370

creating segues, 343-346

dismissals, responding to, 346-348

displaying manually, 346

iPad, 315

preparing, 342-343

programming displays, 349-352

segues, creating, 366-367

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

projects

AllInCode, 577-583

building, 582-583

enabling orientation changes, 577

planning properties and connections, 577

programming interface, 577-582

BackgroundColor, 544

building, 521-522

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

setting up, 780-781

BestFriend

Address Book logic, 712-717

building, 723-724

creating and connecting outlets and actions, 711-712

implementing email logic, 720-721

implementing social networking logic, 721-723

Maps logic, 712-717

setting to white, 723

setting up, 708-709, 745

ColorTilt, 631-632

building, 642-643

creating and connecting outlets and actions, 633-635

designing interface, 633-634

implementing application logic, 635-642

setting up, 632-633

Cupertino, 735

adding background modes, 773

building, 742-743, 753

creating and connecting outlets, 737, 747

designing view, 736-738

implementing application logic, 738-742

preparing for audio, 768-773

setting up, 735-736, 744-745

updating application logic, 747-753

updating user interface, 745-746

CustomPicker, 401-402

building, 416

creating and connecting outlets and actions, 406-407

creating segues, 406

designing interface, 404-406

implementing custom picker view, 409-416

implementing scene segue logic, 407-409

setting up, 402-403

DateCalc, 386

building, 400-401

creating and connecting outlets and actions, 391-392

creating segue, 389-391

designing interface, 388-389

implementing date calculation logic, 396-400

implementing scene segue logic, 393-396

setting up, 386-388

FieldButtonFun, 197

building, 225-226

creating and connecting outlets and actions, 218-219

designing interface, 204-218

implementing application logic, 224-225

implementing keyboard hiding, 220-224

preparing button templates with slicing, 199-204

setting up, 198-199

FlowerColorTable, 471-481

application logic, 476-481

building, 481

connecting delegates and data source outlets, 474-475

designing interface, 473-475

FlowerWeb

building, 278-279

creating and connecting actions, 271-274

creating and connecting outlets, 270-272

designing interface, 263-270

implementing application logic, 274-278

setting up, 263

Gestures, 596-598

adding gesture recognizers to views, 601-605

creating and connecting outlets and actions, 605-607

designing interface, 599-601

implementing, 607-616

implementing application logic, 607-616

setting up, 598-599

GettingAttention

creating and connecting actions and outlets, 303-305

designing interface, 302-303

implementing action sheets, 313-316

implementing alert views, 305-312

setting up, 301-302

IB (Interface Builder), opening, 154-155

ImageHop, 233-234

building, 252-253

creating and connecting outlets and actions, 242-246

designing interface, 234-243

implementing application logic, 246-252

LetsNavigate, 445

creating and connecting outlets and actions, 442-443

creating push segues, 440-441

designing interface, 440-442

setting up, 436-440

LetsTab

building, 455-456

creating and connecting outlets and actions, 450-452

designing interface, 449-451

implementing application logic, 452-455

setting up, 446-448

Master-Detail Application template, creating, 481-499

MediaPlayground, 662-663

accessing and playing music library, 683-688

controlling audio playback, 675-677

creating and connecting outlets and actions, 665-667

designing interface, 664-665

implementing audio playback, 674-675

implementing audio recording, 670-674

implementing camera, 677-681

implementing Core Image filter, 681-682

implementing Movie Player, 667-671

implementing photo library, 677-681

setting up, 663-664

ModalEditor

building, 364

creating and connecting actions and outlets, 360-361

creating modal segues, 358

designing interface, 356-358

implementing application logic, 362-363

setting up, 352-356

Orientation

building, 631

creating and connecting outlet, 627

designing interface, 627-628

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

setting up, 365-366

ReturnMe, 544

creating and connecting, 524

creating settings bundles, 524-531

designing interface, 523-525

implementing application logic, 532-534

setting up, 522-523

Scroller

building, 287-288

creating and connecting outlets and actions, 285-286

designing interface, 280-285

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

setting up, 774-775

Survey, 544

creating and connecting outlets and actions, 536-539

designing interface, 535-537

implementing application logic, 539-543

setting up, 535

Swapper

building, 590

creating and connecting outlets, 586

designing interface, 584-585

implementing application logic, 587-589

setting up, 582-584

Universal

building, 799

creating and connecting outlets, 796-797

designing interface, 796-797

implementing application logic, 797-798

setting up, 796

UniversalToo, 803

creating and connecting outlets, 802

designing interface, 801-802

implementing application logic, 802

setting up, 799-801

Xcode

adding new code files to, 28

adding resources to, 28-32

assistant editor, 42-44

choosing type, 24-27

code completion, 38-40

creating, 24-28

managing properties, 51

navigating, 28-30

navigating code, 35-37

pragma marks, 41-42

removing files and resources, 32

searching code, 40-41

properties, 70

AllInCode project, planning, 577

detailItem, 496-497

versus instance variables, 439

respecting point of, 771

Single View Application template (MVC), planning, 179-182

protocols, 70, 75

creating, 84

pseudo preferences, 506

push segues, creating, 440-441

Q

[top]

Quartz Core framework (Media layer), 106

Quick Help (Xcode), 125-129

Quick Inspector (IB), editing connections, 161-162

Quick Look framework (Core Services layer), 107

R

[top]

range attributes

sliders, setting, 237-239

steppers, setting, 240-241

recordAudio method, 673, 676

relationships

tab bar, creating, 448-449

view controllers, 323

resizable interfaces, designing, 550-552

resources, Xcode projects

adding to, 28-32

removing, 32

responsive interfaces, 547-548

building, Auto Layout, 552-575

designing rotatable and resizeable, 550-552

rotation, enabling, 548-549

Retina display, 2

retina image assets, 35

ReturnMe project, 544

application logic, implementing, 532-534

designing interface, 523-525

outlets, creating and connecting, 524

setting up, 522-523

settings bundles, creating, 524-531

rich media, 647-648, 689-691

AV Foundation framework, 655-657

Core Image framework, 660-662

Image Picker, 657-660

Media Player framework, 648-654

rotatable interfaces, designing, 550-552

rotation, 594

detecting, 631-643

interfaces, 590

enabling, 548-549

swapping views on, 582-590

reacting to, 641-642

reading, Core Motion, 624-626

swapping views on, 582-590

running first app, 17-18

S

[top]

scenes, 323

exits, 323

modal, programming switches, 336-339

multiscene storyboards, adding to, 324

naming, 326-327

navigation, sharing data between, 428

passing data between, 339-341

segues, 323

configuring, 332-333

controlling modal manually, 333-334

creating, 330-333, 406

creating push, 440-441

implementing logic, 393-396, 407-409

modal, 352-364

unwind, 323, 334-336

tab bar, sharing data between, 430-434

scroll views, 288-289

Scroller project

actions and outlets, creating and connecting, 285-286

application logic, implementing, 286-287

building, 287-288

designing interface, 280-285

setting up, 279

scrolling options, interfaces, setting, 212

scrolling views, 261, 279-288

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

segues, 370-371

creating, 389-391, 406

modal, 352-364

creating, 358

popovers, creating, 343-346, 366-367

push, creating, 440-441

scenes

configuring, 332-333

controlling modal manually, 333-334

creating, 330-333

implementing logic, 393-396

unwind, 323, 334-336

setting delegates, 408

selection handles (IB), 142-144

services

Address Book, 693-697, 724-725

email, 698-700

mapping, 702-708

posting to social networking sites, 700-702

setBackgroundHueValue method, 519-520

setIncrement method, 251

setSpeed method, 249-251

settings bundles

creating, 524-531

data storage, 508-510

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

Simulator (iOS), 58-63

generating multi-touch events, 61

Hardware menu commands, 62-64

launching applications, 59-60

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

designing interface, 182-185

implementing application logic, 189-190

planning properties and connections, 179-182

setting up project, 174-179

singletons, 69

Size Inspector (IB), 143-145

slicing, preparing button templates, 199-204

sliders, 230, 252-253

applications, adding, 236-238

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

setting up, 774-775

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

implementing, 469-471

Master-Detail Application template, 471

state preservation, 506

statements

if-then-else, 91-93

switch, 91-93

status bar, setting display, 54-58

steppers, 230-231, 252-253

applications, adding to, 239-240

range attributes, setting, 240-241

stepping through code, 820-822

Store Kit framework (Core Services layer), 108

storeSurvey method, 539-540

storyboards, 323, 370-371, 421

IB (Interface Builder), 133-137

multiscene, 322-341

adding scenes, 324

configuring segues, 332-333

creating segues, 330-333

manually controlling modal segues, 333-334

naming scenes, 326-327

passing data between scenes, 339-341

preparing, 324-330

programming modal scene switches, 336-339

unwind segues, 334-336

navigation controllers, 425-428

tab bar controllers, 430-434

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

designing interface, 535-537

outlets and actions, creating and connecting, 536-539

setting up, 535

suspension, background, 758

handling, 764-765

Swapper project

application logic, implementing, 587-589

building, 590

creating and connecting outlets, 586

interface, designing, 584-585

setting up, 582-584

swiping, 594

switch statements, 91-93

switches, 258, 288-289

adding, 266-267

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

T

[top]

tab bar controllers, 429-434, 445-457

creating relationships, 448-449

storyboards, 430-434

tab bar scenes, sharing data between, 430-434

tabbed editing, Xcode, 44

table views, 459, 471-481, 499

adding, 461-468

tables, 459-460

appearance, 460-461

attributes, setting, 462

cells, 460

creating, 493-494

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

background, 785-786

completing long-running, 773-780

enabling processing, 778-780

long-running, completion, 759-760

task-specific background processing, 759, 768-773

technology layers (iOS), 103

Cocoa Touch, 104-105

Core OS, 108-109

Core Services, 106-108

Media, 105-106

templates

button, preparing with slicing, 199-204

Master-Detail Application, 500

creating, 481-499

universal applications, 791-792

text fields, 196-197, 226-227

adding, 204-205

attributed versus plain, 207-209

attributes

editing, 205-207

traits, 207

text views, 196, 226-227

adding, 209-210

attributes, editing, 210-212

tilt, detecting, 631-643

Toggle In-Call Status Bar command (Simulator), 63

toggleAnimation method, 248-249

toggleFlowerDetail method, 275

toolbars, 373-377, 417-418

bar button items, 375-376

attributes, 376-377

touch, multi-touch gesture recognition, 593-594

tracing

application life cycle, 109-110

applications, 809, 828-830

NSLog function, 810

TV Out command (Simulator), 63

typecasting, 88

U

[top]

UI Framework, Address Book, 694-695

UIActionSheet class, 295-298

UIAlertView class, 292-295

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

UIImageView class, 231, 681

UIKit framework (Cocoa Touch), 104

UILabel class, 117, 196, 231

UILongPressGestureRecognizer class, 594, 617

UIPanGestureRecognizer class, 594, 617

UIPicker class, 119

UIPickerView class, 377, 417

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

UIStepper class, 118, 230-231

UISwipeGestureRecognizer class, 594

UISwitch class, 118, 258, 288

UITapGestureRecognizer class, 594

UITextField class, 119, 196

UITextFieldDelegate class, 226

UITextView class, 119, 196

UITextViewDelegate class, 226

UIView class, 112, 259

UIViewController class, 113

UIWebView class, 288

UIWindow class, 112

universal applications, 789, 805

creating, 794-803

development, 789-794

multiple targets, 804-805

setup changes, 791-794

templates, 791-792

Universal project

application logic, implementing, 797-798

building, 799

designing interface, 796-797

outlets, creating and connecting, 796-797

setting up, 796

UniversalToo project

application logic, implementing, 802

building, 803

designing interface, 801-802

outlets, creating and connecting, 802

setting up, 799-801

unwind segues, scenes, 323, 334-336

updates

motion, managing, 637-638

orientation, registering for, 628-629

upside-down orientation, disabling, 584

user alerts, 291-319

multibutton, creating, 306-309

System Sound Services, 298-300, 316-318

views, 292-295

action sheets, 295-298

implementing, 305-312

user defaults, data storage, 507-508

user input, 195, 257-258

buttons, 195-196

implementation, 197

labels, 196

text fields, 196-197

text views, 196

user interfaces. See interfaces

user locations

accuracy and update filter, 732

adding constants, 736

compass, 744-753

handling errors, 730-731

obtaining, 727-732

V

[top]

variable list, Xcode debugger, accessing, 823-824

variables, 70

declaring, 84-86

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

alert, 292-295

button press response, 309-310

fields, 310-312

implementing, 305-312

Cupertino project, designing, 736-738

gesture recognizers, adding to, 601-605

image, 231

modal, 323

MVC (Model-View-Controller), 169-170

objects, adding to, 140-141

pickers, 379-385

rotation, swapping on, 582-590

scrolling, 261, 279-288

split view controllers, 468-469

implementing, 469-471

Master-Detail Application template, 471

table views, 459

adding, 461-468

web, 259-261

adding, 267

viewWillAppear:animated method, 445

W-X-Y-Z

[top]

web views, 259-261, 288-289

adding, 267

Xcode, 21, 23-58, 63-64

animation resources, adding, 233

asset catalogs, 32-35

assistant editor, 42-44

debugger, 813-828

accessing variable list, 823-824

navigators, 826-828

setting breakpoints, 816-818

steeping through code, 820-822

devices, setting orientations, 53

documentation system, 121-125

installing, 9-12

interface, 27-28

iOS frameworks, 120-129

iOS Simulator, 58-63

generating multi-touch events, 61

launching applications, 59-60

managing snapshots, 45

MVC (Model-View-Controller), implementation, 169-172

projects

adding new code files to, 28

adding resources to, 28-32

building applications, 46-51

choosing type, 24-27

code completion, 38-40

creating, 24-28

managing properties, 51

navigating, 28-30

navigating code, 35-37

pragma marks, 41-42

removing files and resources, 32

searching code, 40-41

setting status bar display, 54-58

Quick Help, 125-129

Single View Application option, 174

tabbed editing, 44

writing code with, 188

Xcode 4 Unleashed, 97