A B C D E F G H I J K L M N O P Q R S T U V W X-Y-Z

Symbols

! (exclamation mark), 103, 197, 268

!=, 103

&&, 103

||

+/- icons, 553

==, 103

(), 103

@2x, 220

@3x, 220

A

[top]

A chips, 8

About, 554

About.plist file, 555

Accelerate, 125

acceleration, reading, with Core Motion, 645-647

acceleration data, 660

accelerometers, 639-642

accessibility attributes, 165-167

Accessibility Inspector, enabling, 167

Accessibility Programming Guide, 180

accessing

media items, 675-676

motion data, 643

orientation data, 643

System Sound Services, 326-327

tutorials, 880-884

Variable List, debuggers, 852-853

accessors, 85

Accounts, 123

action sheets, 322-324

actions

adding, 239

Gestures project, 624-625

GettingAttention project, 332-333

ImageHop project, 266-267

LetsTab project, 476

Single View Application template, 206-207

BackgroundColor project, 541-543

BestFriend project, 732-733

ColorTilt project, 654-655

connecting to, 174-176

CustomPicker project, 431-432

DateCalc project, 418-419

FloraPhotographs project, 295-298

adding, 296-298

Gestures project, 623-625

GettingAttention project, 331-333

ImageHop project, 264-265

implementing, 338-341

Interface Builder (IB), 172-178

LetsNavigate project, 466-467

LetsTab project, 475-476

MediaPlayground project, 687-688

Modal Editor project, 386-387

responding to, alert controllers, 321-322

Scroller project, 310

setting up, 197-199

Single View Application template, 203-207

Survey project, 562-563

active size classes, setting, 821-823

adaptive segues, 358

disabling, 394

Add Missing Constraint menu option, 579

adding

actions, 239

FloraPhotographs project, 296-298

GettingAttention project, 332-333

to ImageHop project, 266-267

LetsTab project, 476

Single View Application template, 206-207

animation resources, ImageHop project, 255

assets catalogs, Xcode projects, 38

audio directions, Cupertino project, 796-799

audio files, 796

AudioToolbox framework, 795-796

background modes, 799-800

blur effect, 549

BestFriend project, 744

Cupertino project, 768

constants, 540

ReturnMe project, 547

constraints, Auto Layout, 579-581

DateChooserViewController, 413

EditorViewController class, 378

frameworks, 684

BestFriend project, 730

generic view controller classes, 459-460, 471

gesture recognizers, 612-613

to views, 619-622

Hop button, 262

image resources, 547-548

CustomPicker project, 427

FlowerColorTable project, 499

FlowerDetail project, 508

Gestures project, 616

image views, ImageHop project, 256

images

to asset catalogs, 39-56

button templates, 220

media files, 684

navigation controller classes, 459-460

navigation controllers, LetsNavigate project, 460

navigation scenes, with show segues, 451-452

new scenes and associating the view controller, 379-380

objects

to interfaces, 201-203

to scrolling view, 308

objects to views, 156-157

outlets, 238

FloraPhotographs project, 296

GettingAttention project, 331

to ImageHop project, 265

LetsNavigate project, 466-467

LetsTab project, 476

Single View Application template, 205-206

push count variable property, 468

LetsTab project, 476-477

resources, Xcode projects, 37

scenes, 352-353

LetsNavigate project, 461-462

LetsTab project, 472

scenes and associating view controllers, 472

scrolling behavior, 310-311

scrolling views, Scroller project, 305-306

segmented controls, FloraPhotographs project, 289

segments, 289-290

simulated devices, iOS Simulator, 69-71

sliders, ImageHop project, 259

speed output labels, 262

steppers, 261

styled buttons, 234

switches, FloraPhotographs project, 291

tab bar controller classes, 471

tab bar controllers, 471-472

tab bar item images, 471

tab bar scenes, 456-457

table views, 488

data source protocols, 491-494

delegate protocols, 494-495

prototype cell attributes, 489-491

setting table attributes, 488-489

text fields, FieldButtonFun project, 225

text views, FieldButtonFun project, 230-231

variable property, for image view size, 616-617

variables, SystemSoundIDs, 796

web views, FloraPhotographs project, 292

Address Book, 123, 713-714

Address Book framework, 716-717

BestFriend project. See BestFriend project

people picker navigation controller delegates, 715-716

Address Book framework, 716-717

Address Book people picker, displaying, 734

Address Book selection, tying to map displays, 740-741

Address Book UI framework, 121, 714-715

advanced delegate methods, picker views, 410-412

AirPlay, 671

alert controllers, 318

action sheets, 322-324

alerts, 318-321

responding to actions, 321-322

alert sounds, 327-328, 341-343

playing, 342

alertBody, 793

alerting users, 317

alert controllers, 318

action sheets, 322-324

alerts, 318-321

responding to actions, 321-322

GettingAttention project. See GettingAttention project

System Sound Services, 325-326

accessing, 326-327

alert sounds and vibrations, 327-328

vibrations, 341-343

alerts, 318-321, 333-338

multibutton alerts, 334-336

using in fields, 337-338

Align, 159-160

AllInCode project

programming interfaces

button touches, 606

defining variables and methods, 603

drawing interfaces when the application launches, 606

implementing interface update method, 604-605

initializing interface objects, 603-604

updating the interface when orientation changes, 606

setting up, 602

altitude property, 753

angles, 659

AnimalChooserViewController, 427

viewDidLoad, 439

animated image views, ImageHop project, 267-269

animation, starting/stopping, ImageHop project, 269-270

animation resources, adding, to ImageHop project, 255

animation speed

ImageHop project, 270-272

incrementing, 273-274

animations, ImageHop project. See ImageHop project

annotations, mapping, 723-724

map view delegate protocol, 724-725

Any, size classes, 833

AnyObject, 95

API Reference, 137

app icons

universal applications, 817

Xcode, 60-62

AppDelegate.swift, 194

Apple, blurs, 303

Apple Developer Program, 10-11

joining paid Developer Program, 12-14

registering as a developer, 11

Apple Developer tools, 23

Cocoa Touch, 24

Model-View-Controller (MVC), 24

Swift, 23

Apple iOS HIG document, 180

Apple Maps, 721

application data source, FlowerDetail project, 512-515

application data structures, 512-515

populating data structures, 515

application data structures, FlowerDetail project, 512-515

application designs, MVC (Model-View-Controller). See MVC (Model-View-Controller)

application logic

BackgroundColor project, 543

reading preferences, 545

storing preferences, 544-545

BackgroundDownload project, 808-809

BestFriend project

conforming to people picker delegate protocol, 734

contact information, 734-737

displaying Address Book people picker, 734

ColorTilt project, 656

acceleration data, 660

displaying attitude data, 659-660

initializing Core Motion Motion Manager, 656-657

managing motion updates, 657-658

preventing interface-orientation changes, 661-662

reacting to rotation, 661

Cupertino project

configuring location manager instance, 763

implementing location manager delegate, 763-766

location manager, 762-763

setting status bar to white, 766

updating, 771-776

updating plist files, 766

FieldButtonFun project, 243-245

FloraPhotographs project, 298

fixing up interface when app loads, 302

hiding/showing detail web views, 298-300

loading and displaying images and details, 300-302

FlowerColorTable project, 502

populating flower arrays, 502

table view data source protocols, 503-505

table view delegate protocols, 505-507

Gestures project, 625-626

pinch recognizer, 627-630

replacing image views, 626

responding to tap gesture recognizers, 627

rotation recognizer, 630-632

shake gestures, 634-635

swipe recognizer, 627

ImageHop project, 267

animated image views, 267-269

animation speed, 270-272

incrementing animation speed, 273-274

starting/stopping animation, 269-270

unreadable status bar, 274

implementing, 208

LetsNavigate project, 467

adding push count variable property, 468

incrementing/displaying counters, 468-469

LetsTab project, 476

adding push count variable property, 476-477

counter displays, 477

incrementing tab bar item badge, 477-478

triggering counter updates, 478-479

Modal Editor project, 388-389

hiding keyboards, 389

Orientation project

determining orientation, 650-651

registering orientation updates, 649-650

ReturnMe project, 557-559

Scroller project, 310

adding scrolling behavior, 310-311

SlowCount project, 802-804

Survey project

hiding keyboards, 564

showing survey results, 565-567

storing survey results, 564-565

application object (UIApplication), 128

application preferences, 527-529

pseudo preferences, 529-530

application resource constraints, iOS devices, 8

applicationDidBecomeActive, 788

applicationDidEnterBackground, 127, 567, 787-788

application:didFinishLaunchingWithOptions, 788

applicationIconBadgeNumber, 793

application:performFetchWithCompletionHandler, 808-809

applications, entering background, 127

applicationWillEnterForeground, 790-791

applicationWillResignActive, 788

apps

iOS apps. See iOS apps

launching with iOS Simulator, 65-66

lifecycle of iOS apps, 126-127

quitting, 209

running Xcode, 53-54

testing, FloraPhotographs project, 303

ARC (Automatic Reference Counting), 107

Arrange, 159-160

Arrays, 89

arrays, 91-92

populating, FlowerColorTable project, 502

arrows, compass, 776

asset catalogs, 684

adding to Xcode projects, 38

images, adding, 39-56

retina image assets, 41-42

assistant editor, Xcode, 48-49

associating view controllers, 461-462

LetsTab project, 472

attitude, 646

reading with Core Motion, 645-647

attitude data, displaying, 659-660

attributed text versus plain text, 227

attributes

bar button items, 404

date pickers, 406-407

navigation bar item attributes, 450-451

prototype cell attributes, 489-491

tab bar item attributes, 455-456

table attributes, 488-489

Attributes Inspector, 164-165, 584

audio, adding task-specific background processing, 795-796

audio directions, adding, to Cupertino project, 796-799

audio files, adding, 796

audio formats, 671

audio playback, MediaPlayground project, 692-693, 695-696

controlling, 696

loading recorded sound, 696-697

audio recording, MediaPlayground project, 692-693

controlling, 694-695

implementing, 693-694

AudioToolbox framework, adding, 795-796

authorization

requesting for Core Location, 752

requesting for notifications, backgrounding, 792

Auto Layout

constraint errors, 586-590

constraints

adding, 579-581

centering, 590-592

content compression resistance, 585-586

content hugging, 585-586

designing rotatable and resizable interfaces, 576-577

gesture recognizers, 615

scrolling views, 311

Auto Layout Guide, 180

Auto Layout system, 161

constraints, 161-162, 164

Content Compression Resistance, 162-163

Content Hugging, 162-163

Automatic Reference Counting (ARC), 107

autosizing features, reverting to old layout approach, 163

AV Audio Player, 677

completion, 677

AV audio recorder, 678-679

AV Foundation framework, 121, 676-677

AV Audio Player, 677

completion, 677

AV audio recorder, 678-679

availability, 142

AVAudioPlayer, 676

AVAudioRecorder, 676

AVEncoderAudioQualityKey, 678

AVFormatIDKey, 678

AVNumberofChannelsKey, 678

AVSampleRateKey, 678

B

[top]

Back button, 451

navigation controllers, 448

background color, ImageHop project, 262-264

Background Fetch mode, adding, 809

background fetches, 786-787, 806

BackgroundDownload project

adding Background Fetch mode, 809

application logic, 808-809

designing interfaces, 807

implementation overview, 806

outlets, 807-808

setting up, 807

background graphics, ImageHop project, 262-264

background image resources, Cupertino project, 759

background modes, 805

adding, 799-800

background processing, 785

background suspension, 790-791

background task processing, SlowCount project, 804-805

background touch, keyboard hiding, 242

background-aware application life cycle methods, 787-789

BackgroundColor project

application logic, 543

reading preferences, 545

storing preferences, 544-545

building apps, 545-546

designing interfaces, 540-541

implementation overview, 539-540

outlets and actions, 541-543

setting up, 540

BackgroundDownload project

adding Background Fetch mode, 809

application logic, 808-809

designing interfaces, 807

implementation overview, 806

outlets, 807-808

setting up, 807

backgrounding, 783-784

background fetches, 786-787

background-aware application life cycle methods, 787-789

disabling, 789-790

local notifications, 784-785, 792

creating/scheduling, 793-794

properties, 793

requesting authorization for notifications, 792

long-running background tasks. See long-running background tasks

suspension, 784, 790-791

task completion for long-running tasks, 785-786

task-specific background processing. See task-specific background processing

badges, source control projects, 871-872

bar button items, 403-404

attributes, 404

navigation controllers, 448

barItem, 475

batteries, locations, 756

BestFriend project

application logic

conforming to people picker delegate protocol, 734

contact information, 734-737

displaying Address Book people picker, 734

blur effect, adding, 549

designing interfaces, 731-732

configuring map view, 732

email logic

conforming to the mail compose delegate protocol, 741

displaying mail compose view, 741-742

mail completion, 742

implementation overview, 730

map logic, 737

controlling map display, 738-740

customizing pin annotation view, 740

requesting permission to use user’s location, 737-738

tying map display to Address Book selection, 740-741

outlets and actions, 732-733

setting status bar to white, 744-745

setting up, 730-731

social networking logic, 742-743

displaying compose view, 743-744

Blame mode, 876

blueButton.png, 220

Bluetooth, 9

blur effect, adding, 549

to BestFriend project, 744

to Cupertino project, 768

blurs, Apple, 303

Bool, 89

Boolean values, 91

Bottom Layout Guide, 151

branching, source control, 865, 877-880

breakpoint navigators, 853

breakpoints

removing, 854

setting, 845-847

bridged data types, 129-130

browsing documentation, Xcode, 138

build schemes, choosing, 52-53

built-in actions, connections, 176

button attributes, editing, 235

button templates, slicing, 219

adding images, 220

button touches, AllInCode project, 606

buttons, 132, 215-216

Back button, 451

bar button items, 403-404

attributes, 404

custom button images, setting, 235-237

styled buttons, adding, 234

C

[top]

calculateDateDifference, 421

calculating heading to Cupertino, 773-774

cameras, MediaPlayground project, 697-700

canBecomeFirstResponder, 632

cells

configuring to display in table view, 504-505

custom cells, 490

tables, 487

centering constraints, 590-592

CFNetwork, 123

CGFloat(), 646

CGRect, 88

chaining, methods, 101

changing state, 235

check boxes, 282

checkout, 864

child properties, 553

chooseImage method, 698

choosing build schemes, 52-53

chosen images, showing, 698-699

chosenColor, 173

CIFilter, 682-683

class declaration, 84

class fields Swift variable properties declarations, 84-85

class files

Single View Application template, projects, 194-195

Swift, 82-83

class declaration, 84

constant declaration, 85

declaring methods, 86-87

ending, 87

IBOutlet declarations, 85-86

import declaration, 83-84

classes

Cocoa Touch, Playground feature, 131-132

Core Application classes, 128

application object (UIApplication), 128

onscreen controls (UIControl), 129

responders (UIResponder), 128-129

view controllers (UIViewControllers), 129

views (UIView), 128

windows object (UIWindow), 128

data type classes, 129

bridged data types, 129-130

nonbridged data types, 130-131

interface classes, 132

buttons (UIButton), 132

labels (UILabel), 132

pickers (UIDatePicker/UIPicker), 134

popovers UIPopoverPresentationController), 134-135

sliders (UISlider), 133

steppers (UISteppers), 133-134

switches (UISwitch), 133

text fields (UITextField/UITextView), 134

OOP (object-oriented programming), 79

classes interface classes segmented control (UISegmentedControl), 133

cleanup

image picker, 699-700

movie player, MediaPlayground project, 691

CLGeocoder class, 738

CLHeading, 758

CLLocation, 754

CLLocationDistance, 753

closures, 318

methods, 102

Cocoa, 119

Cocoa Touch, 24, 117-119, 317

classes

data type classes, 129-131

Playground feature, 131-132

Core Application classes, 128-129

interface classes, 132-135

layers, 120

Address Book UI framework, 121

Event Kit UI, 121

Game Kit, 120

iAd, 121

Map Kit, 120

Message UI framework, 121

Notification Center framework, 121

PhotosUI, 121

UIKit, 120

code

debuggers, 848-850

Interface Builder (IB), 170

implementing, 171-172

object identity, 178-179

opening projects, 170

outlets and actions, 172-178

writing, 178

keyboard hiding, 242-243

low-level code, 446

Xcode

activating tabbed editing, 50

adding marks, to do’s and fix me’s, 47-48

assistant editor, 48-49

code completion, 44-46

editing tools, 42

navigating, 42

searching with search navigator, 46-47

snapshots, 50-51

symbol navigator, 43

code completion, Xcode, 44-46

color, background color, ImageHop project, 262-264

colorChoice, 172

ColorTilt project

application logic, 656

acceleration data, 660

displaying attitude data, 659-660

initializing Core Motion Motion Manager, 656-657

managing motion updates, 657-658

preventing interface-orientation changes, 661-662

reacting to rotation, 661

designing interfaces, 653

implementation overview, 652

outlets and actions, 654-655

setting up, 652-653

comments, adding marks, to do’s and fix me’s, 47-48

commits, source control projects, 873-874

committing changes, source control, 864

Comparison mode, 876

compass, 768

arrows, 776

Cupertino project. See Cupertino project, updating user interfaces, 769-770

setting up, 768-769

compiling, 52

component constants, 428

compose view, displaying in BestFriend project, 743-744

configureView, 521

configuring, 289-290

cells to display in table view, 504-505

devices for development, 16-17

installed size classes, 823

location manager instance, 763

map views, 732

navigation controllers, LetsNavigate project, 460

popover segue, 362-365

popovers, 391-392

projects, as universal, 816-817

segue style, 370-371

connecting

to actions, 174-176

to exits, 367-368

connections

AllInCode project, 602

BestFriend project, 730-731

built-in actions, 176

ColorTilt project, 652-653

creating to outlets, 173-174

Cupertino project, 759

CustomPicker project, 427-428

DateCalc project, 414-415

editing with Quick Inspector, 177

FloraPhotographs project, 288

FlowerColorTable project, 499

FlowerDetail project, 509-510

Gestures project, 616

ImageHop project, 255

LetsNavigate project, 463

LetsTab project, 472

MediaPlayground project, 685

Modal Editor project, 381

Orientation project, 647

planning, 197-199

SlowCount project, 801

verifying, Connections Inspector, 625

Connections Inspector, 174-175, 446

connectivity, iOS devices, 9

constant declaration, 85

constants, 428, 537

adding, 540

ReturnMe project, 547

component constants, 428

declaring, 95

location constants, 759-760

OOP (object-oriented programming), 80

table section constants, 499

constants radian conversion constants ColorTilt project, 653

constraint errors, 586-590

constraint objects, top/bottom layout guides, 581

constraint tools, 589

constraints

adding with Auto Layout, 579-581

Auto Layout system, 161-162, 164

centering, 590-592

editing via Size Inspector, 582-585

horizontal constraints, 581

iOS devices, 8

matching sizes, 598-600

Modal Editor project, 382

setting, 595-597

storyboards, size classes, 830

vertical constraints, 581

viewing via Size Inspector, 582-585

Xcode, 579

constraints objects, navigating, 581-590

contact information, BestFriend project, 734-737

contacts applications, 447

Content Compression Resistance, 162-163, 585-586

Content Hugging, 162-163, 585-586

controlHardware method, 657

controllers

navigation controllers. See navigation controllers

tab bar controllers. See tab bar controllers

view controllers, multiscene development, 446

controlling

audio playback, MediaPlayground project, 696

audio recording, MediaPlayground project, 694-695

controls, expanding, 592-597

convenience initialization method, 268, 285

convenience methods, 93-94

copy and paste, 229

Core Application classes, 128

application object (UIApplication), 128

onscreen controls (UIControl), 129

responders (UIResponder), 128-129

view controllers (UIViewControllers), 129

views (UIView), 128

windows object (UIWindow), 128

Core Audio, 121

Core Bluetooth, 125

Core Data, 32, 123, 190, 568

Core Foundation, 123, 536

Core Graphics, 122

Core Image, 121, 682

filters, 682-683, 700-702

Core Location, 123, 751

Cupertino project

application logic, 762-767

designing views, 760-761

implementation overview, 759

outlets, 762

setting up, 759-760

getting headings, 757-758

getting locations, 751-752

location accuracy and update filter, 756

location errors, 754-756

location manager delegate protocol, 752-754

requesting authorization and plist files, 752

Core Motion, 123, 643, 645-647

Motion Manager, 656-657

radians, 653

reading acceleration, 645-647

Core OS layer, 125

Accelerate, 125

Core Bluetooth, 125

External Accessory, 125

Local Authentication, 125

Security framework, 125

System framework, 125

Core Services layer, 123

Accounts, 123

Address Book, 123

CFNetwork, 123

Core Data, 123

Core Foundation, 123

Core Location, 123

Core Motion, 123

Event Kit, 124

Foundation, 124

HealthKit, 124

HomeKit, 124

Newsstand, 124

Pass Kit, 124

Quick Look, 124

Social, 124

Store Kit, 125

System Configuration, 125

Core Text, 122

correcting errors with issue navigator, 54-57

Count Down Timer, date picker attributes, 406

counter displays, LetsTab project, 477

counter updates, triggering, 478-479

counters

incrementing/displaying, 468-469

initializing, 803

updating, 803-804

Counting Navigation Controller, 462

countLabel, 463

CPU usage, monitoring, 855-856

createStory method, 244

Cupertino project

adding

audio, 795

audio directions, 796-799

background modes, 799

blur effect, 768

application logic

configuring location manager instance, 763

implementing location manager delegate, 763-766

location manager, 762-763

setting status bar to white, 766

updating, 771-776

updating plist files, 766

compass

implementation overview, 768

outlets, 771

setting up, 768-769

updating user interfaces, 769-770

designing views, 760-761

implementation overview, 759

outlets, 762

setting up, 759-760

curly braces, 318

custom button images, setting, 235-237

custom cells, 490

custom picker views, 405, 407-408, 432-438

changing component and row sizes, 436

CustomPicker project, scene segue logic, 438-439

data source protocols, 433-434

delegate protocols, 434-435

implicit selection, 438

loading picker data, 432-433

reacting to selections, 436-438

custom pickers, 425-436

CustomPicker project

creating segues, 431

custom picker views, 432-438

implementation overview, 426

outlets and actions, 431-432

setting up, 426-428

implementation overview, 426

customizing

interfaces, 164

accessibility attributes, 165-167

Attributes Inspector, 164-165

keyboard displays with text input traits, 228-229

pin annotation view, 740

CustomPicker project, 427-428

connections, 427-428

creating segues, 431

custom picker views, 432-438

changing component and row sizes, 436

data source protocols, 433-434

delegate protocols, 434-435

implicit selection, 438

loading picker data, 432-433

reacting to selections, 436-438

designing interfaces, 428-430

implementation overview, 426

outlets and actions, 431-432

scene segue logic, 438-439

setting up, 426-428

D

[top]

data

acceleration data, 660

attitude data, displaying, 659-660

sharing between tab bar scenes, 457-458

sharing between navigation scenes, 452

data detectors, 232-233

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

data source protocols

custom picker views, 433-434

FlowerColorTable project, 501

picker view data source protocol, 408-409

table view data source protocols, FlowerColorTable project, 503-505

table views, 491-494

data storage, 530

direct file system access, 534-535

file paths, 536-537

reading/writing data, 537-538

storage locations for application data, 535-536

settings bundles, 532-534

user defaults, 530-531

reading/writing, 531-532

data structures, populating, 515

data type classes, 129

bridged data types, 129-130

nonbridged data types, 130-131

URLs (NSURL), 131

data types

declaring, 89

object data types, 93

Date, date picker attributes, 406

Date and Time, date picker attributes, 406

date calculation logic, 419

determining the differences between dates, 420

displaying date and time, 419-420

getting dates, 419

implementing date calculation and display, 421-422

updating date output, 422-423

date formats, 420

date output, updating, 422-423

date pickers, 405-406

attributes, 406-407

DateCalc project, 412

creating segues, 417

date calculation logic. See date calculation logic

designing interfaces, 415-417

implementation overview, 413

implementing scene segue logic, 424-425

outlets and actions, 418-419

setting up, 413-415

DateCalc project, 412

building apps, 425

connections, 414-415

creating segues, 417

date calculation logic, 419

determining the differences between dates, 420

displaying date and time, 419-420

getting dates, 419

implementing date calculation and display, 421-422

updating date output, 422-423

designing interfaces, 415-417

implementation overview, 413

implementing scene segue logic, 424-425

outlets and actions, 418-419

setting up, 413-415

variables, 414-415

DateChooserViewController, 414

adding, 413

dates, determining the differences between dates, 420

dates (NSDate), 130

Debug, 842

debug, Xcode, 33

debug navigators, 853-855

DebuggerPractice project, 843-845

debuggers, 841-842

accessing Variable List, 852-853

breakpoint navigators, 853

breakpoints, setting, 845-847

code, 848-850

Debug, 842

debug navigators, 853-855

DebuggerPractice project, 843-845

lldb, 845

monitoring CPU and memory usage, 855-856

Release, 842

variable states, 847-848

view hierarchy, checking, 856-858

watchpoints, 851-852

decision making, 102

declaration, 142

declarations

class declaration, 84

constant declaration, 85

IBOutlet declarations, 85-86

import declaration, 83-84

variable properties declarations, 84-85

declared in, 142

declaring

constants, 95

methods, 86-87

variables, 89

arrays, 91-92

Boolean values, 91

convenience methods, 93-94

data types, 89

dictionaries, 92-93

integers and floating-point numbers, 89-90

object data types, 93

optional values, 95-97

strings, 90-91

default images, ImageHop project, 257

default selections, 438

default simulated devices, 154

default states, FloraPhotographs project, 292

default transitions, 361

delegate protocols

custom picker views, 434-435

FlowerColorTable project, 501, 505-507

location manager delegate protocol, 752-754, 763-766

mail compose delegate protocol, 741

map view delegate protocol, 724-725

people picker delegate protocol, 734

picker views, 409-410

table views, 494-495

describeInteger, 843, 854

description, 142

designing interfaces

adding objects, 201-203

BackgroundColor project, 540-541

BackgroundDownload project, 807

BestFriend project, 731-732

configuring map view, 732

ColorTilt project, 653

CustomPicker project, 428-430

DateCalc project, 415-417

FieldButtonFun project, 224

adding styled buttons, 234

adding text fields, 225

adding text views, 230-231

customizing keyboard displays with text input traits, 228-229

editing button attributes, 235

editing text field attributes, 225-227

editing text view attributes, 231-232

scrolling options, 233-234

setting custom button images, 235-237

setting simulated interface attributes, 224

FloraPhotographs project, 288, 295

adding segmented controls, 289

adding switches, 291

adding web views, 292

segments, adding/configuring, 289-290

setting default state, 292

setting web view attributes, 293-294

sizing controls, 291

FlowerColorTable project, 500-501

Gestures project, 617-618

GettingAttention project, 329-330

ImageHop project, 256

adding Hop button, 262

adding image views, 256

adding sliders, 259

adding speed output labels, 262

adding steppers, 261

background graphics and color, 262-264

making copies, 258

setting default images, 257

setting slider range attributes, 259-261

setting stepper range attributes, 261-262

LetsNavigate project, 465-466

LetsTab project, 473-474

MediaPlayground project, 685-686

Modal Editor project, 381-384

Orientation project, 648

ReturnMe project, 548

Scroller project, 305

adding objects, 308

adding scrolling views, 305-306

resetting View Controller Simulated Size, 309

setting freeform size, 306-307

SlowCount project, 802

setting simulated interface attributes, 199-201

Survey project, 560-561

designing views, Cupertino project, 760-761

desiredAccuracy, 756

detail scenes, updating, 511-512

detail view controllers, 497

FlowerDetail project, 519

displaying detail view, 520-521

detail views, displaying, 520-521

detail web views, hiding/showing, FloraPhotographs project, 298-300

detailItem, 519, 521

details, loading/displaying, FloraPhotographs project, 300-302

developers, 9-10

Apple Developer Program, 10-11

joining paid Developer Program, 12-14

registering, 11

installing Xcode, 14-16

who can become iOS developer, 9-10

development provisioning profiles, iOS apps, 16

device models

universal applications, 819

device orientations, Xcode, 59

devices

configuring for development, 16-17

default simulated devices, 154

iOS devices, 5-6

Dictionaries, 89

dictionaries, 92-93

didRotateFromInterfaceOrientation, 577

different screen sizes, accommodating, 7

direct file system access, 530, 534-535

file paths, 536-537

reading/writing data, 537-538

storage locations for application data, 535-536

direction image resources, Cupertino project, 769

directionArrow, 775

disabling

adaptive segues, 394

backgrounding, 789-790

editing, Master-Detail Application template, 518

dismissDateChooser, 418

dismissing modal scenes, programmatically, 366

displaying

Address Book people picker, 734

attitude data, 659-660

compose view, BestFriend project, 743-744

counters, 468-469

date and time, 419-420

detail views, 520-521

images and details, FloraPhotographs project, 300-302

mail compose view, 741-742

media picker, 704-705

displays, 6-7

updating, 803-804

distanceFromLocation method, 764

distanceView outlet, 762

distantPast(), 95

doAcceleration, 660

doActionSheet method, 339-340

doAlert method, 333, 793-794

doAlertInput, 337

doAttitude, 659-660

document outline, storyboards, 149-152

document outline objects, storyboards, 153-154

documentation, Xcode, 135-136

browsing, 138

navigating, 139-140

searching, 137-138

setting up documentation downloads, 136-137

Documents directory, 536

doMultipleButtonAlert, 335

Done button, keyboard hiding, 240-242

doSound method, 341-342

Double, 89

doVibration method, 343

do-while loops, 106-107

downcasting, 97

downloading changes, source control, 865

downloads, documentation, setting up, 136-137

E

[top]

editing

button attributes, 235

code, Xcode, 42

connections, with Quick Inspector, 177

constraints, via Size Inspector, 582-585

disabling, Master-Detail Application template, 518

tabbed editing, Xcode, 50

text field attributes, 225-227

text view attributes, 231-232

editing tools, Interface Builder (IB), 157

guides, 157-158

selection handles, 158-159

Size Inspector, 159-161

editor, Xcode, 33

Editor menus, 589

EditorViewController, 376

adding, 378

email, 717-719

BestFriend project. See BestFriend project

mail compose view controller delegate, 719

email logic, BestFriend project

conforming to the mail compose delegate protocol, 741

displaying mail compose view, 741-742

mail completion, 742

empty selections, 706

endBackgroundTask, 801

ending class files, Swift, 87

errors

constraint errors, 586-590

correcting with issue navigator, 54-57

location errors, 754-756

placement errors, 588

Event Kit, 124

Event Kit UI, 121

exclamation mark (!), 197, 268

Exit icon, 151

exits, 351, 389

connecting to, 367-368

multiscene projects, 366-368

view controllers, 381

expanding controls, 592-597

expressions, 102-103

if-then-else, 103-104

loops

do-while loops, 106-107

for loops, 105-106

while loops, 106-107

switch statements, 103-104

syntax, 103

extensions, OOP (object-oriented programming), 80

External Accessory, 125

F

[top]

feedback, iOS devices, 9

FieldButtonFun project, 217

application logic, 243-245

building apps, 245

designing interfaces, 224

adding styled buttons, 234

adding text fields, 225

adding text views, 230-231

customizing keyboard displays with text input traits, 228-229

editing button attributes, 235

editing text field attributes, 225-227

editing text view attributes, 231-232

scrolling options, 233-234

setting custom button images, 235-237

setting simulated interface attributes, 224

keyboard hiding, 240-243

outlets and actions, 237-239

preparing button templates with slicing, 219-224

setting up, 218-219

fields, alert, 337-338

file formats, web views, 284

file paths, direct file system access, 536-537

file storage

implementation overview, 559-560

Playground feature, 538-539

Survey project

application logic, 564-567

designing interfaces, 560-561

outlets and actions, 562-563

setting up, 560

fileExistsAtPath, 537

files, removing, from Xcode projects, 37-38

filtering, 35

filters

Core Image, 682-683, 700-702

media picker, 673

fireDate, 793

First Responder icon, 151

first responders, 632-634

FIXME, 47-48

Flash Professional, 10

Float, 89

floating-point numbers, 89-90

FloraPhotographs project, 287

application logic, 298

fixing up interface when app loads, 302

hiding/showing detail web views, 298-300

loading and displaying images and details, 300-302

designing interfaces, 288, 295

adding segmented controls, 289

adding switches, 291

adding web views, 292

segments, adding/configuring, 289-290

setting default state, 292

setting web view attributes, 293-294

sizing controls, 291

outlets and actions, 295-298

setting up, 288

testing apps, 303

FlowerColorTable project

application logic, 502

populating flower arrays, 502

table view data source protocols, 503-505

table view delegate protocols, 505-507

connections, 499

data source protocols, 501

delegate protocols, 501

designing interfaces, 500-501

implementation overview, 499

setting up, 499

variables, 499

FlowerDetail project

application data source, 512-515

application data structures, 512-515

populating data structures, 515

connections, 509-510

detail view controllers, 519

displaying detail view, 520-521

master view controllers, 515

creating table cells, 516-517

creating table view data methods, 515-516

disabling editing, 518

handling navigation events from a segue, 518-519

setting up, 508-510

tweaking interfaces, 510-512

updating detail scenes, 511-512

updating master scenes, 510

web view outlets, 512

variables, 509-510

flowerView, 173

fonts, size classes, 826

for loops, 105-106

Foundation, 124

foundPinch method, 628

foundRotation method, 630-631

foundSwipe method, 627

foundTap method, 627

frames, adding, in BestFriend project, 730

frameworks, 117, 119

Accelerate, 125

Accounts, 123

adding, 684

Address Book, 123

Address Book UI framework, 121

AudioToolbox, adding, 795-796

AV Foundation framework, 121

CFNetwork, 123

Core Audio, 121

Core Bluetooth, 125

Core Data, 123

Core Foundation, 123

Core Graphics, 122

Core Image, 121

Core Location, 123

Core Motion, 123

Core Text, 122

Event Kit, 124

Event Kit UI, 121

External Accessory, 125

Foundation, 124

Game Kit, 120

HealthKit, 124

HomeKit, 124

iAd, 121

Image I/O, 122

Local Authentication, 125

Map Kit, 120

Media Player framework, 122

Message UI framework, 121

Metal, 122

Newsstand, 124

Notification Center framework, 121

OpenGL ES, 122

Pass Kit, 124

Photos framework, 122

PhotosUI, 121

Quartz Core, 122

Quick Look, 124

Security framework, 125

Social, 124

Store Kit, 125

System Configuration, 125

System framework, 125

UIKit, 120

freeform size, setting up in Scroller project, 306-307

fullscreen view, transitioning to in media player, 671

functions versus methods, 190

G

[top]

Game Kit, 120

generating

multitouch events, 66-67

output, from Playground, 110-112

generic view controller classes, adding, 459-460, 471

geocoding, 725-728

Playground feature, 727-728

geographic north, 757

gesture recognizers, 614

adding, 612-613

to views, 619-622

Auto Layout, 615

projects, Gestures project. See Gestures project

gesture-recognizer classes, 612

gestures, multitouch gesture recognition, 611-612

Gestures project

adding gesture recognizers to views, 619-622

application logic, 625-626

pinch recognizer, 627-630

replacing image views, 626

responding to tap gesture recognizers, 627

rotation recognizer, 630-632

shake gestures, 634-635

swipe recognizer, 627

building apps, 635

designing interfaces, 617-618

implementation overview, 614-615

outlets and actions, 623-625

setting up, 616-617

shake recognizer, 632

getFlower, 172

getters, 85

GettingAttention project

action sheets, 338-341

alert sounds and vibrations, 341-343

alerts, 333-338

creating multibutton alerts, 334-336

fields, 337-338

designing interfaces, 329-330

outlets and actions, 331-333

setting up, 328-329

Git, 863

branching/merging, 865

committing changes, 864

downloading changes, 865

repositories, 865-866

connecting to remote repositories, 868-869

creating local, 866-868

working copies, 870-871

Google Maps, 721

GPS, 751

graphics, 6-7

grouped tables, 486

guides, 142

Interface Builder (IB), 157-158

gutters, 844

gyroscope, 639, 642

H

[top]

heading updates, Cupertino project, 771-772, 774-776

headingAvailable, 757, 771

headingFilter, 775

headings

calculating, Cupertino project, 773-774

Core Location, 757-758

HealthKit, 124

hideKeyboard method, 242, 564

hiding

detail web views, FloraPhotographs project, 298-300

keyboards, 564

Modal Editor project, 389

Hint attributes, 166

hi-res images, loading for retina display, 258

HomeKit, 124

Hop button, adding, 262

horizontal constraints, 581

hueSlider, 540

I

[top]

iAd, 121

IB editor, 589

@IBAction, 189-190

@IBOutlet, 188-189, 197

IBOutlet declarations, 85-86

icons, app icons

universal applications, 817

Xcode, 60-62

IDE (integrated development environment), 29

identifier attribute, 534

identifiers, 359

if-then-else, 103-104

Image I/O, 122

image picker, 679-680

cleanup, 699-700

MediaPlayground project, photo library and camera, 697-698

image resources

adding, 547-548

CustomPicker project, 427

FlowerColorTable project, 499

FlowerDetail project, 508

Gestures project, 616

Cupertino project, 759

image views, 253

adding to ImageHop project, 256

animated image views, ImageHop project, 267-269

replacing, Gestures project, 626

ImageHop project, 253-254

application logic, 267

animated image views, 267-269

animation speed, 270-272

incrementing animation speed, 273-274

starting/stopping animation, 269-270

unreadable status bar, 274

building apps, 274-275

designing interfaces, 256

adding Hop button, 262

adding image views, 256

adding sliders, 259

adding speed output labels, 262

adding steppers, 261

background graphics and color, 262-264

making copies, 258

setting default images, 257

setting slider range attributes, 259-261

setting stepper range attributes, 261-262

outlets and actions, 264-265

adding outlets, 265

setting up, 254-255

adding animation resources, 255

images

adding

to asset catalogs, 39-56

to button templates, 220

chosen images, 698-699

default images, ImageHop project, 257

direction image resources, Cupertino project, 769

hi-res images, loading for retina display, 258

JPEG images, 40

loading/displaying, FloraPhotographs project, 300-302

PNG images, 40

retina image assets, 41-42

size classes, 826-827

tab bar item images, adding, 471

UI image picker controller delegate, 680-682

imperative programming, 78

implementing

application logic, Single View Application template, 208

audio recording, MediaPlayground project, 693-694

code, Interface Builder (IB), 171-172

interface update method, 604-605

Single View Application template, 191-192

split view controllers, 496-497

implicit preferences, 539

BackgroundColor project

application logic, 543-545

designing interfaces, 540-541

implementation overview, 539-540

outlets and actions, 541-543

setting up, 540

implicit selection, custom picker views, 438

implicit unwrapping, 97-98

import declaration, class files, 83-84

incrementCount, 468

incrementCountFirst, 475

incrementCountSecond, 475

incrementCountThird, 475

incrementing

animation speed, 273-274

counters, 468-469

tab bar item badge, 477-478

indexed tables, 486

initializing, interface objects, 603-604

initializing Core Motion Motion Manager, 656-657

initWithContentURL, 689

input. See also output

FieldButtonFun project, 217

application logic, 243-245

building the app, 245

designing interfaces. See designing interfaces

keyboard hiding, 240-243

preparing button templates with slicing, 219-224

setting up, 218-219

iOS devices, 9

inspecting output from Playground, 110-112

installed size classes, configuring, 823

installing, Xcode, 14-16

instance methods, OOP (object-oriented programming, 80

instances, OOP (object-oriented programming), 80

instantiation, 149

OOP (object-oriented programming), 80

Int, 89

integers, 89-90

interactions

buttons, 215-216

labels, 216

text fields, 216

text views, 216

Interface Builder (IB), 147-148

Auto Layout system, 161

constraints, 161-162, 164

Content Compression Resistance, 162-163

Content Hugging, 162-163

connecting to code, 170

implementing, 171-172

object identity, 178-179

opening projects, 170

outlets and actions, 172-178

writing code, 178

customizing interfaces, 164

accessibility attributes, 165-167

Attributes Inspector, 164-165

editing tools, 157

guides, 157-158

selection handles, 158-159

Size Inspector, 159-161

overview, 148

previewing interfaces, 168-169

resources, 179

storyboards, 149

document outline, 149-152

document outline objects, 153-154

user interfaces

adding object to views, 156-157

Object Library, 154-155

interface classes, 132

buttons (UIButton), 132

labels (UILabel), 132

pickers (UIDatePicker/UIPicker), 134

popovers

UIPopoverPresentationController), 134-135

sliders (UISlider), 133

steppers, 133-134

switches (UISwitch), 133

text fields (UITextField/UITextView), 134

interface classes segmented control (UISegmentedControl), 133

interface objects, initializing, 603-604

interface rotation events, 644

interface update method, implementing, 604-605

interface-orientation changes, preventing, 661-662

interfaces

customizing, 164

accessibility attributes, 165-167

Attributes Inspector, 164-165

designing, 199-203

adding objects, 201-203

setting simulated interface attributes, 199-201

expanding controls, 593-595

iOS 7, 7

previewing, 168-169

programmatically defined interfaces. See programmatically defined interfaces

responsive interfaces

designing rotatable and resizable interfaces, 576-578

rotation, 573-574

rotation, enabling, 574-575

tweaking. See tweaking interfaces

interpreting results, of Quick Help, 142-143

Intrinsic Size setting, Auto Layout system, 163

iOS 6, segmented controls, 290

iOS 7, interfaces, 7

iOS Accessibility Inspector, enabling, 167

iOS applications, data storage, 527-529

iOS apps

configuring devices for development, 16-17

development provisioning profiles, 16

launching, 19-22

lifecycle of iOS apps, 126-127

running, 16-19

iOS Dev Center, 14

iOS developers, 9-10

Apple Developer Program, 10-11

joining paid Developer Program, 12-14

registering as a developer, 11

installing Xcode, 14-16

iOS devices, 5-6

application resource constraints, 8

connectivity, 9

display and graphics, 6-7

feedback, 9

input, 9

registering multiple devices, 17

iOS Human Interface Guidelines, 180

iOS Simulator, 63-64

adding addition simulated devices, 69-71

data storage, 535

launching apps, 65-66

multitouch events, generating, 66-67

rotating, simulated devices, 67

running, first time, 57

testing other conditions, 68-69

iPads, screens, 6

iPhone, 6

iPhone 5, screens, 7

iPhone 6, screens, 6

iPhone 6+, screens, 6

iPhones

popovers, 393-395

screens, 6

iPod touch, 6

isAnimating, 269

issue navigator, correcting, errors, 54-57

items, navigation controllers, 448

J

[top]

JPEG images, 40

K

[top]

key constants, 540

ReturnMe project, 547

keyboard displays, customizing with text input traits, 228-229

keyboard hiding

adding code, 242-243

FieldButtonFun project, 240-243

background touch, 242

Done button, 240-242

Modal Editor project, 389

keyboard types, 229

keyboards

hiding, 564

virtual keyboards, 217

keychains, 17

L

[top]

Label attributes, 166

labels, 216

getting in scolling view, 309

UILabel, 132

lastSound, 797

launch images, Xcode, 60, 62-63

launch screens

universal applications, 818

Xcode, 60, 62-63

launching

apps, iOS Simulator, 65-66

iOS apps, 19-22

layers, 119

Cocoa Touch, 120

Address Book UI framework, 121

Event Kit UI, 121

Game Kit, 120

iAd, 121

Map Kit, 120

Message UI framework, 121

Notification Center framework, 121

PhotosUI, 121

UIKit, 120

Core OS layer, 125

Accelerate, 125

Core Bluetooth, 125

External Accessory, 125

Local Authentication, 125

Security framework, 125

System framework, 125

Core Services layer, 123

Accounts, 123

Address Book, 123

CFNetwork, 123

Core Data, 123

Core Foundation, 123

Core Location, 123

Core Motion, 123

Event Kit, 124

Foundation, 124

HealthKit, 124

HomeKit, 124

Newsstand, 124

Pass Kit, 124

Quick Look, 124

Social, 124

Store Kit, 125

System Configuration, 125

Media layer, 121

AV Foundation framework, 121

Core Audio, 121

Core Graphics, 122

Core Image, 121

Core Text, 122

Image I/O, 122

Media Player framework, 122

Metal, 122

OpenGL ES, 122

Photos framework, 122

Quartz Core, 122

layout guides, 581

leading, 579

leading space, 581

LetsNavigate project

application logic, 467

adding push count variable property, 468

incrementing/displaying counters, 468-469

building apps, 469

designing interfaces, 465-466

implementation overview, 458-459

outlets and actions, 466-467

setting up, 459

adding scenes and associating view controllers, 461-462

adding/configuring navigation controllers, 460

connections, 463

variables, 463

show segues, creating, 464-465

LetsNavigate project setting up adding navigation controllers and generic view controller classes, 459-460

LetsTab project

adding scenes and associating view controllers, 472

application logic, 476

adding push count variable property, 476-477

counter displays, 477

incrementing tab bar item badge, 477-478

triggering counter updates, 478-479

building apps, 479

designing interfaces, 473-474

implementation overview, 470

outlets and actions, 475-476

setting up, 470

adding tab bar controller and generic view controller classes, 471

adding tab bar controllers, 471-472

connections, 472

variables, 472

tab bar relationships, creating, 472-473

LetsTab project setting up adding tab bar item images, 471

Library/Caches directory, 536

lifecycle of iOS apps, 126-127

lifecycles, background-aware application life cycle methods, 787-789

limitations, MVC (Model-View-Controller), 186

linking, 52

listings

Activating Interface Rotation, 575

Add a Method as a Placeholder for the Unwind Segue, 381

Adding a Method in GenericViewController.swift to Update Each Scene’s Counter, 478

Adding Audio Feedback When the Heading Updates, 798-799

Adding the foundRotation Method, 630-631

Adding the getFlower Implementation, 300-301

Applying a Filter to the Image in the UIImageView, 700-701

Asking to Become a First Responder, 634

Calculating a Heading to a Destination, 774

Calculating the Date Difference, 422

Calculating the Difference Between Two Dates, 421

Calculating the Distance When the Location Updates, 764-765

Calling the NSLog Function, 839

Centering the Map and Adding an Annotation, 739

Changing the Label as the Orientation Changes, 650

Cleaning Up After the Movie Player, 691

Completed setOutput Method, 208

The Completed setSpeed Method, 270-271

Completing the recordAudio Method, 696

Configuring a Cell to Display in Table View, 504-505

Configuring and Displaying the Mail Compose View, 741

Configuring the Detail View Using the detailItem, 521

Configuring the Sections and Row Count for the Table View, 492

Creating a Method to Display the User’s Selection, 437

Creating and Initializing the Audio Recorder, 693

Creating the Location Manager Instance, 763

Customizing the Annotation View, 724, 740

Defining Handlers Within Alert Actions, 322

Defining the Minimum Background Fetch Interval, 808

Disable the Adaptive Segue, 394

Disabling Editing of Table Cells, 518

Disabling Editing of the UI, 518

Disabling Interface Rotation, 662

Dismissing the Mail Compose View, 742

Dismissing the Modal Scene, 424, 439

Displaying the Media Picker, 704

The doAlertInput Implementation, 337

Editing the viewDidLoad Method, 842-844

Enabling Scrolling in Your Scroll View, 311

Enabling the Ability to Be a First Responder, 632

Example of the Tap Gesture Recognizer, 613

The Final viewDidLoad Implementation, 703-704

Finishing the Background Fetch by Implementing application:performFetchWithCompletionHandler, 808-809

Forward Geocoding, 725

Handling a Cancel Action in the People Picker, 715

Handling a Popover Dismissal, 374

Handling a Row Selection Event, 506

Handling a User’s Music Selection, 705

Handling Button Touches, 606

Handling Drilling Down to Individual Properties, 716

Handling Empty Selections in the Media Picker, 706

Handling Heading Updates, 758

Handling Location Manager Errors, 763-764

Handling Playback Completion, 677

Handling Rotation in didRotateFromInterfaceOrientation, 606

Handling the Cancellation of a Media Selection, 674

Handling the Cancellation of an Image Selection, 681, 699

Handling the Composition Completion, 719

Handling the Heading Updates, 775-776

Handling the Notification of Playback Completion, 672

Handling the Selection of a Contact, 735-736

Handling the Selection of a Person in the Address Book, 716

Handling the Selection of an Image, 681

Handling the Selection of Media Items, 674

Handling the User’s Selection of an Image, 699

Hiding the Keyboard, 243

Hiding the Keyboard When Its Done Key Is Pressed, 389

Hiding the Keyboard When It Isn’t Needed, 564

Implementing a Custom Picker Data Source Protocol, 408

Implementing a Custom Picker Delegate Protocol, 409-410

Implementing a UIActionSheet Class, 323-324

Implementing an Alert-styled UIAlertController, 319-320

Implementing playAudio Method, 696

Implementing the chooseImage Method, 698

Implementing the controlHardware Method, 657-658

Implementing the createStory Method, 244

Implementing the describeInteger Method, 843

Implementing the doAccleration Method, 660

Implementing the doActionSheet Method, 339-340

Implementing the doAlert Method, 333

Implementing the doAttitude Method, 659

Implementing the doMultipleButtonAlert Method, 335

Implementing the doRotation Method, 661

Implementing the doVibration Method, 343

Implementing the Final setBackgroundHueValue Method, 544

Implementing the foundPinch Method, 628

Implementing the foundSwipe Method, 627

Implementing the foundTap Method, 627

Implementing the incrementCount Method, 468

Implementing the Initial setBackgroundHueValue method, 543

Implementing the newBFF method, 734

Implementing the playMusic Method, 706

Implementing the setValuesFromPreferences Method, 558

Implementing the showResults Method, 566

Implementing the Simple Tweet Compose View, 743-744

Implementing the storeSurvey Method, 564-565

Implementing the toggleFlowerDetail Method, 300

Implementing the viewDidLoad Method, 626

Implementing updateInterface, 604-605

Initializing the Interface When the Application Loads, 606

Initializing the Motion Manager, 657

Initializing the Movie Player, 689-690

Initializing the Sound File References in viewDidLoad, 796-797

Initiating Movie Playback, 690-691

Loading and Playing a Sound, 327

Loading the Animation, 267-268

Loading the Data Required for the Picker View, 432-433

Loading the Settings When the Initial View loads, 559

Performing a Default Calculation When the Date Chooser Is First Displayed, 423

Placing an Annotation, 723

Populating the Field with the Current Email Address, 388

Populating the Flower Data Structures, 513

Prepare the Interface (But Don’t Display It Yet), 603

Preparing and Showing the Compose Dialog, 719

Preparing the Audio Player with a Default Sound, 695-696

Preparing to Post to Facebook, 721

Presenting the Picker with Custom Views, 411

Processing a CIImage with a CIFilter, 682

Providing a Custom View for Each Possible Picker Element, 434-435

Reacting to a User’s Selection, 437

Reacting to a User’s Touch, 494

Reacting to Core Location Errors, 755

Requesting Heading Updates, 771-772

Requesting Notification Authorization, 792

Responding to a Shake Gesture, 634-635

Returning a Count of the Rows (Array Elements) in Each Section, 503

Returning a Heading for Each Section, 504

Returning the Number of Components, 433

Returning the Number of Elements per Component, 434

Returning the Number of Sections in the Table, 503

Reverse Geocoding, 726

A Sample Interface File, 83

Scheduling a Timer When the Application Starts, 803

Set a Preferred Size for the Popover, 425

Set a Size for the Editor Popover, 391

Set the Popover Presentation Controller Delegate, 394

Setting a Custom Height and Width for the Picker Components and Rows, 436

Setting a Default Selection, 438

Setting an Exit Point, 367

Setting the Detail View Controller’s detailItem, 519

Setting the End of Background Processing, 805

Setting the Initial Scene’s Label to the Editor Scene’s Field, 389

Setting the Start on Background Processing, 805

Setting the Status Bar Appearance in preferredStatusBarStyle, 274, 745, 766

Setting Up and Displaying the Image Picker, 680

A Silly Implementation of tableView:cellForRowAtIndexPath, 493

Starting and Stopping the Animation in toggleAnimation, 269-270

Storing the Recently Received Location for Later Use, 772-773

Supporting All Interface Orientations, 602

Typical Setup and Display of a Media Picker, 673

Update the viewDidLoad Method to Ask for Location Authorization, 738

ateAnimalChooserViewController’s viewDidLoad Method, 439

Updating doAlert to Register a Local Notification, 793-794

Updating the Counter, 804

Updating the Display in viewWillAppear:animated, 469

Updating the Display Using the Counter Values, 477

Updating the Initial recordAudio Method, 694

Updating the Settings in viewDidLoad, 545

Updating the Tab Bar Item’s Badge, 477-478

Updating the viewDidLoad Method to Set the Initial Display, 302

Updating viewDidLoad to Loop 2,000 Times, 851

Using prepareForSegue:sender to Grab the View Controllers, 375

Using the Motion Manager, 646

The ViewController.swift Outlets and Actions, 266-267

ViewController.swift with Connections Defined, 198

Watching for Orientation Changes, 649

Your First Code Exercise, 44

lldb, 845

loading

hi-res images for Retina display, 258

images and details, FloraPhotographs project, 300-302

picker data, 432-433

recorded sound, 696-697

remote content, web views, 284-285

sound, 326-327

loadRequest, loading remote content, 284-285

Local Authentication, 125

local notifications, backgrounding, 784-785, 792

creating/scheduling, 793-794

properties, 793

requesting authorization for notifications, 792

local repositories, Git, 866-868

location accuracy, Core Location, 756

location constants, Cupertino project, 759-760

location errors, 754-756

location manager, Cupertino project, 762-763

location manager delegate implementing, 763-766

location manager delegate protocol, 752-754

location manager instance, configuring, 763

location managers, Core Location, 751-752

locations

batteries, 756

Core Location. See Core Location

mapping, 728-729

north, 757

permissions, requesting to use user’s location, 737-738

storing recent, Cupertino project, 772-773

locMan, 764

Log mode, 876

long pressing, 612

long-running background tasks, 800

SlowCount project

application logic, 802-804

background task processing, 804-805

designing interfaces, 802

implementation overview, 800

outlets, 802

setting up, 801

long-running tasks, task completion for long-running tasks, 785-786

loops

do-while loops, 106-107

for loops, 105-106

while loops, 106-107

low-level code, 446

M

[top]

Mac Developer Program, 19

magnetic compass, 768

magnetic north, 757

mail completion, BestFriend project, 742

mail compose delegate protocol, 741

mail compose view, displaying, 741-742

mail compose view controller delegate, 719

Main.storyboard file, 196

managing, project properties, Xcode, 58

map displays

controlling map display, 738-740

tying to Address Book selection, 740-741

Map Kit, 120, 721-723

map logic, BestFriend project, 737

controlling map display, 738-740

customizing pin annotation view, 740

requesting permission to use user’s location, 737-738

tying map display to Address Book selection, 740-741

map view delegate protocol, 724-725

map views, configuring, 732

mapping, 721-723

annotations, 723-724

map view delegate protocol, 724-725

geocoding, 725-728

permissions, 728-729

maps, BestFriend project. See BestFriend project

MARK, 47-48

master scenes, updating, 510

master view controllers, 497

FlowerDetail project, 515

creating table cells, 516-517

creating table view data methods, 515-516

disabling editing, 518

handling navigation events from a segue, 518-519

Master-Detail Application template, 497-498, 507

FlowerDetail project

application data source, 512-515

master view controllers, 515-519

setting up, 508-510

tweaking interfaces, 510-512

implementation overview, 507-508

matching sizes, constraints, 598-600

media files, adding, 684

media items, accessing, 675-676

Media layer, 121

AV Foundation framework, 121

Core Audio, 121

Core Graphics, 122

Core Image, 121

Core Text, 122

Image I/O, 122

Media Player framework, 122

Metal, 122

OpenGL ES, 122

Photos framework, 122

Quartz Core, 122

media picker, 673-674

displaying, 704-705

filters, 673

music library, 702-703

media picker controller delegate, 674

media player

audio formats, 671

transitioning to fullscreen view, 671

Media Player framework, 122, 670-671

accessing media items, 675-676

media picker, 673-674

media picker controller delegate, 674

movie player, 671

movie player completion, 672

music player, 675

media selections, 674

MediaPlayground project

audio playback, 692-693, 695-696

controlling, 696

loading recorded sound, 696-697

audio recording, 692-693

controlling, 694-695

implementing, 693-694

Core Image filter, 700-702

designing interfaces, 685-686

implementation overview, 683-684

movie player, 689

cleanup, 691

implementing playback, 690-691

initializing movie player instance, 689-690

music library, 702

displaying media picker, 704-705

empty selections, 706

media picker, 702-703

playing music, 706-708

preparing music player, 703-704

user’s selection, 705

outlets and actions, 687-688

photo library and camera, 697-700

setting up, 684-685

variables, 685

memory management, 107

memory usage, monitoring, 855-856

merging, source control, 865, 877-880

Message UI framework, 121, 741

Metal, 122

method stubs, 178

methods

chaining, 101

closures, 102

declaring, 86-87

versus functions, 190

syntax, 99-100

MFMailComposeViewController, 742

Misplaced Views error, 587

MKMapView, 728

MKMapViewDelegate protocol, 740

Modal Editor project, 377

application logic, 388-389

hiding keyboards, 389

connections, 381

designing interfaces, 381-384

implementation overview, 377

modal segues, creating, 384-385

outlets and actions, 386-387

popovers

configuring, 391-392

iPhones, 393-395

setting up, 377-381

toggling to universal applications, 392-393

unwinding back to the initial scene, 386

variables, 381

modal scenes, dismissing, programmatically, 366

modal segues

creating, 359-361, 384-385

presenting manually, 366

modal user interface, 318

modal views, 351

Model-View-Controller (MVC), 24

monitoring CPU and memory usage, 855-856

motion data, accessing, 643

motion hardware

accelerometers, 640-642

gyroscope, 642

Motion Manager, Core Motion, 656-657

motion sensing, 639

motion updates, managing, 657-658

motion-input mechanisms, 639

movie playback, implementing, 690-691

movie player, 671

MediaPlayground project, 689

cleanup, 691

implementing playback, 690-691

initializing movie player instance, 689-690

movie player instance, initializing, 689-690

MPMediaItem, 670, 675-676

MPMediaItemCollection, 670, 674

MPMediaPickerController, 670, 673-674

MPMoviePlayerController, 670

MPMusicPlayerController, 670

multibutton alerts, creating, 334-336

multiscene development, view controllers, 446

multiscene projects, 352

exits, 366-368

modal segues

creating, 359-361

presenting manually, 366

naming scenes, 354-355

passing data between scenes, 375-377

popover segue, configuring, 362-365

popovers, 371-374

popover arrow, 372-373

PopoverPresentationControllerDelegate Protocol, 374

segues

creating, 356-359

programming from scratch, 369-371

view controller subclasses, 355-356

multiscene projects adding additional scenes, 352-353

multiscene storyboards, 350

multiscene projects. See multiscene projects

multitouch events, generating, 66-67

multitouch gesture recognition, 611-612

multivalue picker, 552, 556

music library

displaying media picker, 704-705

empty selections, 706

MediaPlayground project, 702

media picker, 702-703

playing music, 706-708

preparing music player, 703-704

user’s selection, 705

music player, 675

preparing, 703-704

mutators, 85

MVC (Model-View-Controller), 24, 185

data models, 190

limitations, 186

Single View Application template. See Single View Application template

structured application design, 186-187

view controllers, 188

@IBAction, 189-190

@IBOutlet, 188-189

views, 187-188

myInstanceMethod, 97

myOptionalString, 97

N

[top]

named parameters, 100

naming, scenes, 354-355

navigating

code, Xcode, 42

constraints objects, 581-590

documentation, Xcode, 139-140

projects, Xcode, 34-35

navigation bar item attributes, setting up, 450-451

navigation bars, 448

navigation controller classes, adding, 459-460

navigation controllers, 445, 447

bar button items, 448

items, 448

navigation bars, 448

people picker navigation controller delegates, 715-716

projects, 458

LetsNavigate project. See LetsNavigate project

sharing data between navigation scenes, 452

storyboards, 449-450

adding navigation scenes with show segues, 451-452

setting navigation bar item attributes, 450-451

navigation events, segues, 518-519

navigation scenes, adding with show segues, 451-452

navigator, Xcode, 33

Newsstand, 124

nonbridged data types, 130-131

URLs (NSURL), 131

non-Retina display, 61

north, locations, 757

Notification Center framework, 121

NSDate, 130, 423-424

NSDateFormatter, 423-424

NSFileHandle, 538

NSLog, 838-839

viewing output, 839-841

NSNotificationCenter, 647, 672

NSOperationQueue, 647

NSsearchPathForDirectoriesInDomains, 536

NSTimeInterval, 420

NSURL, 131

loading remote content, 284-285

NSURLRequest, loading remote content, 284-285

number formatters, 765

numberOfComponentsInPickerView, 408

numberOfSectionsInTableView, 491

numberOfTapsRequired, 613

numberOfTouchesRequired, 613

O

[top]

object data types, 93

object identity, 178-179

Object Library, user interfaces, 154-155

Objective-C, 81, 129

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

imperative programming, 78

object-oriented approach, 78-79

objects, 513

adding

to interfaces, 201-203

to scrolling view, 308

adding to views, 156-157

OOP (object-oriented programming), 80

onscreen controls (UIControl), 129

OOP (object-oriented programming), 78-79

terminology, 79-81

OpenGL ES, 122

opening projects, Interface Builder (IB), 170

opinionated software, 527-528

optional binding, 98-99

optional chaining, 101

optional values, 95-96, 99

declaring, 96-97

optional binding, 98-99

unwrapping, 97-98

orientation

constraints. See constraints

determining, 650-651

screen orientations, 575

sensing. See sensing orientation

orientation changes

AllInCode project, 602

orientation data, accessing, 643

orientation notifications, requesting, through UIDevice, 644

Orientation project

application logic, determining orientation, 650-651

designing interfaces, 648

implementation overview, 647

outlets, 649

sensing orientation, application logic, 649-651

setting up, 647

orientation updates, registering, 649-650

orientationChanged method, 650

originalRect, 617

outlets

BackgroundColor project, 541-543

BackgroundDownload project, 807-808

BestFriend project, 732-733

ColorTilt project, 654-655

Cupertino project, 762, 769, 771

CustomPicker project, 431-432

DateCalc project, 418-419

FieldButtonFun project, 237-239

FloraPhotographs project, 295-298

Gestures project, 623-625

GettingAttention project, 331-333

ImageHop project, 264-265

Interface Builder (IB), 172-178

LetsNavigate project, 466-467

LetsTab project, 475-476

MediaPlayground project, 687-688

Modal Editor project, 386-387

Orientation project, 649

ReturnMe project, 549

Scroller project, 310

setting up, 197-199

Single View Application template, 203-207

SlowCount project, 802

Survey project, 562-563

output. See also input

from Playground, generating and inspecting output, 110-112

outputLabel, 418, 475

P

[top]

pagination, scrolling views, 308

paid Developer Program, joining, 12-14

panning, 612

parameters, 142

named parameters, 100

OOP (object-oriented programming), 80

parent classes, OOP (object-oriented programming), 79

parent controllers, 446

parentViewController, 468

Pass Kit, 124

passing data between scenes, 375-377

passthrough views, 364-365

pausing, playback, media player, 671

people picker delegate protocol, conforming to, 734

people picker navigation controller delegates, 715-716

peoplePickerNavigationControllerDidCancel, 715

peoplePickerNavigationController:didSelectPerson, 715

permissions

mapping, 728-729

requesting to use user’s location, 737-738

photo library, MediaPlayground project, 697-700

Photos framework, 122

PhotosUI, 121

picker data, loading, 432-433

picker view data source protocol, 408-409

picker views, 407-408

advanced delegate methods, 410-412

picker view data source protocol, 408-409

picker view delegate protocol, 409-410

pickers, 134, 401, 404-405

custom pickers. See custom pickers

date pickers, 406

attributes, 406-407

projects. See DateCalc project

picker views, 407-408

advanced delegate methods, 410-412

picker view data source protocol, 408-409

picker view delegate protocol, 409-410

pickerView:didSelectRow:inComponent, 409

pickerView:numberOfRowsInComponent, 408

pickerView:rowHeightForComponent, 410

pickerView:titleForRow:forComponent, 409

pickerView:viewForRow:viewForComponent:ReusingView, 410

pickerView:widthForComponent, 410

pin annotation view, customizing, 740

pinch recognizer, 621-622

responding to, 627-630

pinching, 612

pinning, 581

placement errors, 588

plain tables, 486

plain text versus attributed text, 227

play, 689

play method, media player, 671

playAudio, 696

playback, implementing, 690-691

playbackState, 675

Playground feature, 108

Cocoa Touch classes, 131-132

creating new, 108-109

dates and times, 423-424

FieldButtonFun project, 244

file storage, 538-539

generating and inspecting output, 110-112

geocoding, 727-728

ImageHop project, 272-273

testing, user notifications, 324-325

testing web views, 285-286

transformations, 632-633

using, 110

playing

alert sounds with vibrations, 342

music, music library, 706-708

sound, 326-327

System Sound Services, 341-342

playMovieFinished, 672

playMusic method, 706

plist files

requesting, 752

updating, 766

PNG images, 40

pop, 447

popover arrow, 372-373

popover segue, configuring, 362-365

popoverPresentationController, 394

popovers, 134-135, 340, 371-374, 439

configuring, 391-392

iPhones, 393-395

popover arrow, 372-373

preparing, 362-363

sizing, 363

UIPrPresentationControllerDelegate Protocol, 374

populating

arrays, FlowerColorTable project, 502

data structures, 515

posting to social networking sites, 720-721

preference types, 533

preferences

BackgroundColor preferences, reading, 545

storing in BackgroundColor project, 544-545

preferredStatusBarStyle, 745

prepareForSegue:sender method, 375-377

presentation directions, 364-365

presentation styles, segues, 370

presentingViewController, 422

preventing, interface-orientation changes, 661-662

previewing, interfaces, 168-169

print, 838

println, 838

private, 87

products, 35

programmatically defined interfaces, 600-601

AllInCode project

programming interfaces, 602-606

setting up, 602

implementation overview, 601-602

programming interfaces

AllInCode project

button touches, 606

defining variables and methods, 603

drawing interfaces when the application launches, 606

implementing interface update method, 604-605

initializing interface objects, 603-604

updating the interface when orientation changes, 606

rotation, 577

project code, 35

project groups, 35

project properties, managing, 58

project types, Xcode, 30-32

projects

AllInCode project. See AllInCode project

BackgroundColor project. See BackgroundColor project

BackgroundDownload project. See BackgroundDownload project

BestFriend project. See BestFriend project

ColorTilt project. See ColorTilt project

configuring as universal, 816-817

Cupertino project. See Cupertino project

CustomPicker project. See CustomPicker project

DateCalc project. See DateCalc project

DebuggerPractice project, 843-845

FieldButtonFun project. See FieldButtonFun project

FloraPhotographs project. See FloraPhotographs project

FlowerColorTable project. See FlowerColorTable project

FlowerDetail project. See FlowerDetail project

Gestures project. See Gestures project

GettingAttention project. See GettingAttention project

ImageHop project. See ImageHop project

MediaPlayground project. See MediaPlayground project

Modal Editor project. See Modal Editor project

multiscene projects. See multiscene projects

navigation controllers, 458

LetsNavigate project. See LetsNavigate project

Orientation project. See Orientation project

ReturnMe project. See ReturnMe project

Scroller project. See Scroller project

Single View Application template, 192-193

class files, 194-195

planning variables and connections, 197-199

storyboard files, 195-197

SlowCount project. See SlowCount project

source control, 871

branching/merging, 877-880

commits, 873-874

pulls, 874

pushes, 873-874

status codes, 871-872

updates, 874

viewing revisions, 874-877

Survey project. See Survey project

Swapper project. See Swapper project

tab bar controllers, 469

LetsTab project. See LetsTab project

Xcode, 30

adding new assets catalogs, 38

adding resources, 37

choosing project types, 30-32

getting your bearings, 33-34

navigating, 34-35

removing files and resources, 37-38

Xcode Asset Catalog, 38

ProjectTests, 35

properties, 551

child properties, 553

local notifications, backgrounding, 793

Values property, 552

versus variables, 189

protocols, 84

OOP (object-oriented programming), 80

prototype cell attributes, 489-491

provisioning profiles, viewing, 22

pseudo preferences, 529-530

public, 87

pulls, source control projects, 874

push, 447

push count variable property, adding, 468

LetsTab project, 476-477

pushCount, 463

pushes, source control projects, 873-874

Q

[top]

Quartz Core, 122

Quick Help, Xcode, 140-141

activating Quick Help Inspector, 141-142

interpreting results, 142-143

Quick Help Inspector, activating, 141-142

Quick Inspector, editing, connections, 177

Quick Look, 124

quitting apps, 209

R

[top]

radian conversion constants ColorTilt project, 653

radian/degree conversion constants, Cupertino project, 769

radio buttons, 282

reading

acceleration with Core Motion, 645-647

attitude with Core Motion, 645-647

BackgroundColor preferences, 545

data, direct file system access, 537-538

rotation, with Core Motion, 645-647

user defaults, 531-532

recordAudio method, 693-694, 696

recorded sound, loading, 696-697

registering

as a developer, Apple Developer Program, 11

multiple devices, 17

orientation updates, 649-650

related, 142

relationships, 351

tab bar relationships, creating, 472-473

Release, 842

remote content, loading, with web views, 284-285

remote repositories, Git, 868-869

removeConstraints, 615

removing

annotations from map view, 724

breakpoints, 854

files and resources, Xcode projects, 37-38

objects from views, 156

repeatInterval, 793

replacing image views, Gestures project, 626

repositories

Git, 865-866

connecting to remote repositories, 868-869

creating local, 866-868

source control, 864

requestAlwaysAuthorization, 752

requesting

authorization, Core Location, 752

authorization for notifications, backgrounding, 792

orientation notifications, through UIDevice, 644

permissions, to use user’s location, 737-738

plist files, 752

requestWhenInUseAuthorization, 737, 752

resetting View Controller Simulated Size, 309

resizable interfaces, Auto Layout, 576-577

resources

adding to Xcode projects, 37

removing from Xcode projects, 37-38

responders (UIResponder), 128-129

responding

to pinch recognizer, 627-630

to rotation recognizer, 630-632

to swipe recognizer, 627

to tap gesture recognizers, 627

responding to actions, alert controllers, 321-322

responsive interfaces

designing rotatable and resizable interfaces

Auto Layout, 576-577

programming interfaces, 577

size classes, 578

swapping views, 577-578

rotation, 573-574

enabling, 574-575

restoration, pseudo preferences, 529-530

retina display, hi-res images, loading, 258

retina image assets, 41-42

Retina image files, 61

Retina-naming convention, 42

return statement, 575

ReturnMe project

application logic, 557-559

building apps, 559

designing interfaces, 548

outlets, 549

setting up, 547-548

settings bundles, creating, 549-556

returns, 142

revisions, viewing, source control, 874-877

rich media

AV Foundation framework, 676-677

AV Audio Player, 677

AV Audio Player completion, 677

AV audio recorder, 678-679

Core Image, 682

filters, 682-683

image picker, 679-680

UI image picker controller delegate, 680-682

Media Player framework, 670-671

accessing media items, 675-676

media picker, 673-674

media picker controller delegate, 674

movie player, 671

movie player completion, 672

music player, 675

MediaPlayground project. See MediaPlayground project

Root.plist file, 554

rootViewController, 809

rotatable interfaces, Auto Layout, 576-577

rotating, 612

simulated devices, 67

rotation, 573-574

enabling, 574-575

programming interfaces, 577

reacting to, 661

reading, with Core Motion, 645-647

screen-locking function, 578

size classes, 578

swapping views, Swapper project. See Swapper project

rotation recognizer, 622

responding to, 630-632

rotationRate, 646

running

apps, Xcode, 53-54

iOS apps, 16-19

S

[top]

sample code, 137, 142

sandbox, 535

scaling, 294

scene segue logic

CustomPicker project, 438-439

DateCalc project, 424-425

scenes, 188, 351

adding, 352-353

LetsNavigate project, 461-462

LetsTab project, 472

naming, 354-355

passing data between, 375-377

scheduling notifications, backgrounding, 793-794

scolling views, Auto Layout, 311

screen orientations, 575

screen-edge panning, 612

screen-locking function, 578

screens

accommodating different screens, 7

iPads, 6

iPhone 5, 7

iPhone 6, 6

iPhone 6+, 6

iPhones, 6

Scroller project

application logic, 310

adding scrolling behavior, 310-311

designing interfaces, 305

adding objects, 308

adding scrolling views, 305-306

resetting View Controller Simulated Size, 309

setting freeform size, 306-307

outlets and actions, 310

scrolling behavior, adding, 310-311

scrolling options, FieldButtonFun project, 233-234

scrolling views, 286, 303-304

adding to Scroller project, 305-306

building apps, 312

implementation overview, 304-305

pagination, 308

Scroller project. See Scroller project

SDK (software development kit), 534

SDK Guides, 137

search navigator, searching code, Xcode, 46-47

searching

code, Xcode, 46-47

documentation, Xcode, 137-138

Security framework, 125

segmented controls, 133, 282-283

adding, FloraPhotographs project, 289

iOS 6, 290

sizing in FloraPhotographs project, 291

segments, adding/configuring, 289-290

Segue drop-down, 359

segue style, configuring, 370-371

segues, 351, 377, 446

adaptive segues, 358

disabling, 394

creating, 356-359

CustomPicker project, 431

DateCalc project, 417

Modal Editor project, 377

implementation overview, 377

setting up, 377-381

modal segues

creating, 359-361

presenting manually, 366

navigation events, 518-519

popover segue, configuring, 362-365

programming from scratch, 369-371

show segues, adding navigation scenes, 451-452

unwind segues, 366-368, 389

selection handles, Interface Builder (IB), 158-159

selections

empty selections, 706

music library, 705

self, OOP (object-oriented programming), 80-81

sender variable, 630

sendMail method, 741

sendTweet method, 742

sensing orientation, 647

implementation overview, 647

Orientation project

application logic, 649-651

designing interfaces, 648

outlets, 649

setting up, 647

setBackgroundHueValue method, 542-544

setDateTime, 418, 422-423

setFullscreen:animated, 689

setMessageBody:isHTML, 742

setMiminumBackgroundFetchInterval, 808

setObject:forKey, 531

setOutput method, 208

setters, 85

Settings application, 528, 546-547

implementation overview, 547

ReturnMe project, 547-548

application logic, 557-559

designing interfaces, 548

outlets, 549

setting up, 547-548

settings bundles, 549-556

settings bundles, 528, 530, 532-534, 547

creating, 549-556

Settings icon, 61

setToRecipients method, 719

setValuesFromPreferences, 557-558

shake gestures, 634-635

shake recognizer, 632

first responders, 632-634

shaking, 612

sharing data

between navigation scenes, 452

between tab bar scenes, 457-458

show segues

adding, navigation scenes, 451-452

creating, 464-465

showing

chosen images, 698-699

detail web views, FloraPhotographs project, 298-300

survey results, Survey project, 565-567

showResults method, 566

signing identity, 17

simulated devices

adding, iOS Simulator, 69-71

rotating, 67

simulated interface attributes

FieldButtonFun project, 224

setting, 199-201

Single View Application template, 191

application logic, implementing, 208

applications, building, 208-209

designing interfaces, 199-203

implementing, 191-192

outlets and actions, 203-207

projects, 192-193

class files, 194-195

planning variables and connections, 197-199

storyboard files, 195-197

singleton, OOP (object-oriented programming), 80

size classes

Any, 833

configuring installed, 823

designing rotatable and resizable interfaces, 578

fonts, 826

images, 826-827

setting active size classes, 821-823

setting manually, 824-825

storyboards, 827-833

tools, 821

universal applications, 818-820

tools, 821-827

Size Inspector

editing, constraints, 582-585

Interface Builder (IB), 159-161

viewing, constraints, 582-585

sizes, matching, constraints, 598-600

sizing, 490

controls, FloraPhotographs project, 291

popovers, 363

SLComposeViewController, 720

slices, creating, 220-224

slicing, 40, 220-224

button templates, 219

adding images, 220

slider range attributes, setting, 259-261

sliders, 133, 251-252

adding, ImageHop project, 259

ImageHop project. See ImageHop project

SlowCount project

application logic, 802-804

background task processing, 804-805

designing interfaces, 802

implementation overview, 800

outlets, 802

setting up, 801

snapshots, Xcode, 50-51

Social, 124

social networking, BestFriend project. See BestFriend project

social networking logic, BestFriend project, 742-743

displaying compose view, 743-744

social networking sites, posting to, 720-721

sound

loading, 326-327

user notifications, 326

sound resources, 328

soundName, 793

sounds, alerting users, 327-328

soundSetting, 679

source control, 863

branching/merging, 865

committing changes, 864

downloading changes, 865

projects, 871

branching/merging, 877-880

commits, 873-874

pulls, 874

pushes, 873-874

status codes, 871-872

updates, 874

viewing revisions, 874-877

repositories, 864

working copies, 864

space, data storage, 536

speed, animation speed

ImageHop project, 270-272

incrementing, 273-274

speed output labels, adding, 262

split view controllers, 495

hierarchies, FlowerDetail project, 509

implementing, 496-497

Master-Detail Application template, 497-498

splitViewController, 497

startAnimating, 269

starting

animation, ImageHop project, 269-270

segues, 366

startUpdatingLocation method, 763

state preservation, 529-530

status bars

setting to white, 744-745

Cupertino project, 766

unreadable status bar, 274

status codes, source control, projects, 871-872

stepper range attributes, setting up, 261-262

steppers, 133-134, 252-253

adding, 261

ImageHop project. See ImageHop project

stopAnimating, 269

stopping animation, ImageHop project, 269-270

storage locations for application data, 535-536

Store Kit, 125

storeSurvey method, 564-565

storing

BackgroundColor preferences, 544-545

recent locations, 772-773

survey results, 564-565

storyboard feature, 446

storyboard files, Single View Application template, projects, 195-197

storyboard identifiers, setting, 369

storyboard segues, 446

storyboards, 188, 351

Interface Builder (IB), 149

document outline, 149-152

document outline objects, 153-154

multiscene storyboards. See multiscene storyboards

navigation controllers, 449-450

adding navigation scenes with show segues, 451-452

setting navigation bar item attributes, 450-451

size classes, 827-833

tab bar controllers, 454-455

adding tab bar scenes, 456-457

setting tab bar item attributes, 455-456

universal applications, 818

String objects, 89, 536

stringForKey, 532

strings, 90-91

structs, 88

stub methods, 178

styled buttons, adding, 234

subclasses, OOP (object-oriented programming,) 79

subversion. See SVN

subviews, 152

superclasses, OOP (object-oriented programming), 79

superviews, 152, 579

Supported Device Orientations, 59

supportedInterfaceOrientations method, 574, 602

Supporting Files group, 35

Survey project

application logic

hiding keyboards, 564

showing survey results, 565-567

storing survey results, 564-565

designing interfaces, 560-561

outlets and actions, 562-563

setting up, 560

survey results

showing, 565-567

storing, 564-565

suspension, backgrounding, 784, 790-791

SVN, 863

branching/merging, 865

committing changes, 864

downloading changes, 865

swapping views

designing rotatable and resizable interfaces, 577-578

rotation, Swapper project. See Swapper project

Swift, 23, 77, 81

automatic reference counting, 107

class files, 82-83

class declaration, 84

constant declaration, 85

declaring methods, 86-87

ending, 87

IBOutlet declarations, 85-86

import declaration, 83-84

variable properties declarations, 84-85

Xcode, 88

decision making, 102

declaring variables and constants, 89

arrays, 91-92

Boolean values, 91

constants, 95

convenience methods, 93-94

data types, 89

dictionaries, 92-93

integers and floating-point numbers, 89-90

object data types, 93

optional values, 95-97

strings, 90-91

expressions, 102-103

if-then-else, 103-104

loops, 104-107

switch statements, 103-104

memory management, 107

methods

chaining, 101

closures, 102

syntax, 99-100

object-oriented programming, 77-78

properties versus variables, 189

type casting, 95

unwrapping, 97-98

Swift optional binding, 98-99

Swift type conversion, 94

swipe recognizer, 621

swipe recognizer responding to, 627

swiping, 612

switch statements, 103-104

switches, 133, 282

adding, in FloraPhotographs project, 291

symbol navigator, Xcode, 43

synchronize method, 532

syntax

expressions, 103

methods, 99-100

System Configuration, 125

System framework, 125

System Sound Services, 325-326, 796

accessing, 326-327

alert sounds and vibrations, 327-328

playing, 341-342

SystemSoundIDs, 796

T

[top]

tab bar controller classes, adding, 471

tab bar controllers, 445, 452-453

adding, 471-472

projects, 469

LetsTab project. See LetsTab project

storyboards, 454-455

adding tab bar scenes, 456-457

setting tab bar item attributes, 455-456

tab bar items, 453-454

tab bars, 453-454

tab bar images, 456

tab bar item attributes, setting, 455-456

tab bar item badge, incrementing, 477-478

tab bar item images, adding, 471

tab bar items, 453-454

tab bar relationships, creating, 472-473

tab bar scenes

adding, 456-457

sharing data, 457-458

tab bars, 453-454

Tabbed Application, 454

tabbed editing, Xcode, 50

table attributes, setting, 488-489

table cells, 487

creating, 516-517

table section constants, 499

table view controllers, 486

table view data methods, creating, 515-516

table view data source protocols, FlowerColorTable project, 503-505

table view delegate protocols, FlowerColorTable project, 505-507

table views, 486

adding, 488

data source protocols, 491-494

delegate protocols, 494-495

prototype cell attributes, 489-491

setting table attributes, 488-489

tables

FlowerColorTable project

implementation overview, 499

setting up, 499

grouped tables, 486

indexed tables, 486

plain tables, 486

table view app, FlowerColorTable project. See FlowerColorTable project

tableView:cellForRowAtIndexPath, 491

tableView:numberOfRowsInSection, 491

tableView:titleForHeaderInSection, 491

tap gesture recognizers, responding to, 627

tap recognizer, 619-620

tapping, 612-613

task completion for long-running tasks, backgrounding, 785-786

task-specific background processing, 785, 795

adding audio, 795-796

background modes, adding, 799-800

Cupertino project, adding audio directions, 796-799

templates

button templates. See button templates

Master-Detail Application template. See Master-Detail Application template

Single View Application template. See Single View Application template

Tabbed Application, 454

testing

apps, FloraPhotographs project, 303

conditions, iOS Simulator, 68-69

transformations, Playground feature, 632-633

user notifications, 324-325

web views, 285-286

text, plain versus attributed, 227

text field attributes, customizing keyboard displays, 228-229

text fields, 134, 216

adding, to FieldbuttonFun project, 225

editing attributes, 225-227

text view attributes, editing, 231-232

text views, 216, 219

adding to FieldbuttonFun project, 230-231

tilt, 642

ColorTilt project. See ColorTilt project

Time, date picker attributes, 406

timeIntervalSinceDate, 420

timers, initializing, 803

timeZone, 793

TODO, 47-48

toggleAnimation method, 269

toggleFlowerDetail, 288

toggleSwitch, 540

toggling to universal applications, 392-393

toolbar, Xcode, 33

toolbars, 401

bar button items, 403-404

role of, 401-402

tools

Apple Developer tools, 23

Cocoa Touch, 24

Model-View-Controller (MVC), 24

Swift, 23

bar button items, attributes, 404

editing tools. See editing tools

size classes, 821

Top Layout Guide, 151

top/bottom layout guides, 581

touch

background touch, keyboard hiding, 242

gesture recognizers, adding, 612-613

tracing

iOS application lifecycle, 126-127

lifecycle of iOS apps, 126-127

trailing, 579

trailing space, 581

Traits attributes, 166

transformations, Playground feature, 632-633

transition styles, segues, 370

transition types, 360

transitioning, to fullscreen view, media player, 671

triggering counter updates, LetsTab project, 478-479

tutorials, accessing, 880-884

tweaking interfaces, FlowerDetail project, 510-512

updating detail scenes, 511-512

updating master scenes, 510

web view outlets, 512

type casting, 95

type conversion, 94

type method, OOP (object-oriented programming), 80

U

[top]

UI elements, 401

pickers. See pickers

toolbars. See toolbars

UI image picker controller delegate, 680-682

UIAlertController, 318

UIApplication, 128

UIBackgroundTaskIdentifier, 801

UIButton class, 132, 282

UIColor object, 540

UIControl, 129

UIDatePicker. See date pickers, 134

UIDevice, requesting orientation notifications, 644

UIDeviceOrientation, 644

UIDeviceOrientationDidChangeNotification, 649

UIImage initialization method, 268

UIKit, 120

UILabel, 93, 132

UILocalNotification, 784-785, 792

UILongPressGestureRecognizer, 612

UInt32(), 327

UIPanGestureRecognizer, 612

UIPicker, 134

UIPickerViewDelegate, 409

UIPinchGestureRecognizer, 612

UIPopoverPresenationController, 134-135

UIPopoverPresentationControllerDelegate Protocol, 374

UIResponder, 128-129

UIRotationGestureRecognizer, 612, 622

UIScreenEdgePanGestureRecognizer, 612

UIScrollView, 312

UISegmentedControl, 133

UISlider, 133

UIStepper), 133-134

UIStoryboardSegue, 376

UISwipeGestureRecognizer, 612

UISwitch, 133

UITabBar, 453

UITabBarItem, 453

UITableViewDataSource, 491

UITapGestureRecognizer, 612

UITextField, 134

UITextView, 134

UIView, 128

UIViewController, 129

UIWebView, 312

UIWindow, 128

universal applications, 574, 815-816

app icons, 817

configuring projects as, 816-817

device models, 819

launch screens, 818

size classes, 818-820

storyboards, 827-833

tools, 821-827

storyboards, 818

targets, 819

toggling to universal applications, 392-393

unreadable status bar, ImageHop project, 274

unwind, 351

unwind destinations, determining dynamically, 368

unwind segues, 366-368, 389

unwinding back to the initial scene, Modal Editor project, 386

unwrapping, 97-98

exclamation mark (!), 284

update filters, Core Location, 756

Update Frames, 382

updates, source control projects, 874

updating

counters, 803-804

Cupertino project, application logic, 771-776

date output, 422-423

detail scenes, 511-512

displaying, 803-804

master scenes, 510

plist files, 766

user interfaces, Cupertino project, 769-770

URLs (NSURL), 131

user defaults, 530-531

reading/writing, 531-532

user interfaces

adding object to views, 156-157

Object Library, 154-155

updating, Cupertino project, 769-770

user notifications, 317

alert controllers, 318

action sheets, 322-324

alerts, 318-321

responding to actions, 321-322

GettingAttention project. See GettingAttention project

System Sound Services, 325-326

accessing, 326-327

alert sounds and vibrations, 327-328

testing, 324-325

vibrations, 341-343

userAcceleration, 646

utility, Xcode, 33

V

[top]

Values property, 552, 556

Variable List, accessing, 852-853

variable properties declarations, 84-85

variable property

for image view size, adding, 616-617

OOP (object-oriented programming), 80

variable states, debuggers, 847-848

variables

AllInCode project, 602

BestFriend project, 730-731

ColorTilt project, 652-653

Cupertino project, 759, 769

CustomPicker project, 427-428

DateCalc project, 414-415

declaring, 89

arrays, 91-92

Boolean values, 91

convenience methods, 93-94

data types, 89

dictionaries, 92-93

integers and floating-point numbers, 89-90

object data types, 93

optional values, 95-97

strings, 90-91

FloraPhotographs project, 288

FlowerColorTable project, 499

FlowerDetail project, 509-510

Gestures project, 616

ImageHop project, 255

LetsNavigate project, 463

LetsTab project, 472

MediaPlayground project, 685

Modal Editor project, 381

OOP (object-oriented programming), 80

Orientation project, 647

planning, 197-199

versus properties, 189

SlowCount project, 801

verifying connections, Connections Inspector, 625

Version editor, viewing revisions, 875-876

vertical constraints, 581

verticalAccuracy, 753

vibrations, 326-328, 341-343

View Controller icon, 150-151

View Controller Scene, 150

View Controller Simulated Size, resetting, 309

view controller subclasses, 355-356

view controllers, 129, 351, 445-446

associating, 461-462

LetsTab project, 472

with new scenes, 379-380

exits, 381

mail compose view controller delegate, 719

multiscene development, 446

MVC (Model-View-Controller), 188

@IBAction, 189-190

@IBOutlet, 188-189

view hierarchy, checking, 856-858

View icon, 151

ViewController.swift, 194

viewDidAppear method, 438, 690

viewDidLoad, 439, 545, 626, 843-844

viewing

constraints, via Size Inspector, 582-585

NSLog output, 839-841

provisioning profiles, 22

revisions, source control projects, 874-877

views, 351

adding gesture recognizers, 619-622

creating in Swapper project,

designing, Cupertino project, 760-761

MVC (Model-View-Controller), 187-188

scrolling views. See scrolling views, 286

swapping, designing rotatable and resizable interfaces, 577-578

web views, 283

loading remote content, 284-285

supported content types, 284

testing, 285-286

views (UIView), 128

virtual keyboards, 217

Voiceover, 165

W

[top]

waitView outlet, 762

warnings, fixing, with issue navigator, 54-57

watchpoints, 851-852

web view outlets, FlowerDetail project, 512

web views, 283

adding in FloraPhotographs project, 292

detail web views, hiding/showing, 298-300

loading remote content, 284-285

setting attributes, FloraPhotographs project, 293-294

supported content types, 284

testing, 285-286

while loops, 106-107

whiteButton.png, 220

Wi-Fi, 9

willRotateToInterfaceOrientation:duration method, 578

windows object (UIWindow), 128

Windows options for development, 10

working copies

Git, 870-871

source control, 864

writing

code, Interface Builder (IB), 178

data, direct file system access, 537-538

user defaults, 531-532

X-Y-Z

[top]

Xcode, 24, 29-30, 207

app icons, 60-62

building apps, 52

choosing build scheme, 52-53

correcting errors with issue navigator, 54-57

running, 53-54

code

activating tabbed editing, 50

adding marks, to do’s and fix me’s, 47-48

assistant editor, 48-49

code completion, 44-46

editing, 42

navigating, 42

searching with search navigator, 46-47

snapshots, 50-51

symbol navigator, 43

constraints, 579

device orientations, 59

documentation, 135-136

browsing, 138

navigating, 139-140

searching, 137-138

setting up documentation downloads, 136-137

installing, 14-16

launch images/screens, 62-63

managing project properties, 58

projects, 30

adding new assets catalogs, 38

adding resources, 37

choosing project types, 30-32

getting your bearings, 33-34

navigating, 34-35

removing files and resources, 37-38

Xcode Asset Catalog, 38

Quick Help, 140-141

activating Quick Help Inspector, 141-142

interpreting results, 142-143

resources, 180

settings bundles, creating, 549-556

Xcode 6 Debug View Hierarchy, 856

Xcode Asset Catalog, 38

Xcode editor, 42

Xcode slicing tool, 219