M

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

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

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

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

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

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

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

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

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

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

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

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset