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
! (exclamation mark), 103, 197, 268
!=, 103
&&, 103
||
+/- icons, 553
==, 103
(), 103
@2x, 220
@3x, 220
A chips, 8
About, 554
About.plist file, 555
Accelerate, 125
acceleration, reading, with Core Motion, 645-647
acceleration data, 660
accessibility attributes, 165-167
Accessibility Inspector, enabling, 167
Accessibility Programming Guide, 180
accessing
motion data, 643
orientation data, 643
System Sound Services, 326-327
Variable List, debuggers, 852-853
accessors, 85
Accounts, 123
actions
adding, 239
GettingAttention project, 332-333
LetsTab project, 476
Single View Application template, 206-207
BackgroundColor project, 541-543
FloraPhotographs project, 295-298
GettingAttention project, 331-333
Interface Builder (IB), 172-178
MediaPlayground project, 687-688
responding to, alert controllers, 321-322
Scroller project, 310
Single View Application template, 203-207
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
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
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
Hop button, 262
CustomPicker project, 427
FlowerColorTable project, 499
FlowerDetail project, 508
Gestures project, 616
image views, ImageHop project, 256
images
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 scrolling view, 308
outlets, 238
FloraPhotographs project, 296
GettingAttention project, 331
to ImageHop project, 265
LetsTab project, 476
Single View Application template, 205-206
push count variable property, 468
resources, Xcode projects, 37
LetsTab project, 472
scenes and associating view controllers, 472
scrolling views, Scroller project, 305-306
segmented controls, FloraPhotographs project, 289
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 item images, 471
table views, 488
data source protocols, 491-494
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 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
responding to actions, 321-322
alert sounds, 327-328, 341-343
playing, 342
alertBody, 793
alerting users, 317
alert controllers, 318
responding to actions, 321-322
GettingAttention project. See GettingAttention project
System Sound Services, 325-326
alert sounds and vibrations, 327-328
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
animations, ImageHop project. See ImageHop project
map view delegate protocol, 724-725
Any, size classes, 833
AnyObject, 95
API Reference, 137
app icons
universal applications, 817
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
BackgroundDownload project, 808-809
BestFriend project
conforming to people picker delegate protocol, 734
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
setting status bar to white, 766
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
replacing image views, 626
responding to tap gesture recognizers, 627
swipe recognizer, 627
ImageHop project, 267
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
hiding keyboards, 389
Orientation project
determining orientation, 650-651
registering orientation updates, 649-650
Scroller project, 310
adding scrolling behavior, 310-311
Survey project
hiding keyboards, 564
showing survey results, 565-567
storing survey results, 564-565
application object (UIApplication), 128
application preferences, 527-529
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
testing, FloraPhotographs project, 303
ARC (Automatic Reference Counting), 107
Arrays, 89
populating, FlowerColorTable project, 502
arrows, compass, 776
asset catalogs, 684
adding to Xcode projects, 38
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
navigation bar item attributes, 450-451
prototype cell attributes, 489-491
tab bar item attributes, 455-456
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
AudioToolbox framework, adding, 795-796
authorization
requesting for Core Location, 752
requesting for notifications, backgrounding, 792
Auto Layout
constraints
content compression resistance, 585-586
designing rotatable and resizable interfaces, 576-577
gesture recognizers, 615
scrolling views, 311
Auto Layout Guide, 180
Auto Layout system, 161
Content Compression Resistance, 162-163
Automatic Reference Counting (ARC), 107
autosizing features, reverting to old layout approach, 163
AV Audio Player, 677
completion, 677
AV Foundation framework, 121, 676-677
AV Audio Player, 677
completion, 677
availability, 142
AVAudioPlayer, 676
AVAudioRecorder, 676
AVEncoderAudioQualityKey, 678
AVFormatIDKey, 678
AVNumberofChannelsKey, 678
AVSampleRateKey, 678
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
designing interfaces, 807
implementation overview, 806
setting up, 807
background graphics, ImageHop project, 262-264
background image resources, Cupertino project, 759
background modes, 805
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
implementation overview, 539-540
setting up, 540
BackgroundDownload project
adding Background Fetch mode, 809
designing interfaces, 807
implementation overview, 806
setting up, 807
background-aware application life cycle methods, 787-789
local notifications, 784-785, 792
properties, 793
requesting authorization for notifications, 792
long-running background tasks. See long-running background tasks
task completion for long-running tasks, 785-786
task-specific background processing. See task-specific background processing
badges, source control projects, 871-872
attributes, 404
navigation controllers, 448
barItem, 475
batteries, locations, 756
BestFriend project
application logic
conforming to people picker delegate protocol, 734
displaying Address Book people picker, 734
blur effect, adding, 549
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
setting status bar to white, 744-745
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
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
Back button, 451
attributes, 404
custom button images, setting, 235-237
styled buttons, adding, 234
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
chosen images, showing, 698-699
chosenColor, 173
class declaration, 84
class fields Swift variable properties declarations, 84-85
class files
Single View Application template, projects, 194-195
class declaration, 84
constant declaration, 85
ending, 87
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
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
movie player, MediaPlayground project, 691
CLGeocoder class, 738
CLHeading, 758
CLLocation, 754
CLLocationDistance, 753
closures, 318
methods, 102
Cocoa, 119
classes
Core Application classes, 128-129
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
Interface Builder (IB), 170
opening projects, 170
writing, 178
low-level code, 446
Xcode
activating tabbed editing, 50
adding marks, to do’s and fix me’s, 47-48
editing tools, 42
navigating, 42
searching with search navigator, 46-47
symbol navigator, 43
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
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
compiling, 52
component constants, 428
compose view, displaying in BestFriend project, 743-744
configureView, 521
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
projects, as universal, 816-817
connecting
connections
AllInCode project, 602
built-in actions, 176
Cupertino project, 759
editing with Quick Inspector, 177
FloraPhotographs project, 288
FlowerColorTable project, 499
Gestures project, 616
ImageHop project, 255
LetsNavigate project, 463
LetsTab project, 472
MediaPlayground project, 685
Modal Editor project, 381
Orientation project, 647
SlowCount project, 801
verifying, Connections Inspector, 625
Connections Inspector, 174-175, 446
connectivity, iOS devices, 9
constant declaration, 85
adding, 540
ReturnMe project, 547
component constants, 428
declaring, 95
OOP (object-oriented programming), 80
table section constants, 499
constants radian conversion constants ColorTilt project, 653
constraint objects, top/bottom layout guides, 581
constraint tools, 589
constraints
adding with Auto Layout, 579-581
Auto Layout system, 161-162, 164
editing via Size Inspector, 582-585
horizontal constraints, 581
iOS devices, 8
Modal Editor project, 382
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
convenience initialization method, 268, 285
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 Graphics, 122
Cupertino project
implementation overview, 759
outlets, 762
location accuracy and update filter, 756
location manager delegate protocol, 752-754
requesting authorization and plist files, 752
Core Motion, 123, 643, 645-647
radians, 653
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
Counting Navigation Controller, 462
countLabel, 463
CPU usage, monitoring, 855-856
createStory method, 244
Cupertino project
adding
audio, 795
background modes, 799
blur effect, 768
application logic
configuring location manager instance, 763
implementing location manager delegate, 763-766
setting status bar to white, 766
updating plist files, 766
compass
implementation overview, 768
outlets, 771
updating user interfaces, 769-770
implementation overview, 759
outlets, 762
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
implicit selection, 438
reacting to selections, 436-438
CustomPicker project
creating segues, 431
implementation overview, 426
implementation overview, 426
customizing
interfaces, 164
accessibility attributes, 165-167
keyboard displays with text input traits, 228-229
pin annotation view, 740
creating segues, 431
changing component and row sizes, 436
data source protocols, 433-434
implicit selection, 438
reacting to selections, 436-438
implementation overview, 426
data
acceleration data, 660
attitude data, displaying, 659-660
sharing between tab bar scenes, 457-458
sharing between navigation scenes, 452
data models, MVC (Model-View-Controller), 190
data source protocols
FlowerColorTable project, 501
picker view data source protocol, 408-409
table view data source protocols, FlowerColorTable project, 503-505
data storage, 530
direct file system access, 534-535
storage locations for application data, 535-536
data structures, populating, 515
data type classes, 129
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
date formats, 420
date output, updating, 422-423
DateCalc project, 412
creating segues, 417
date calculation logic. See date calculation logic
implementation overview, 413
implementing scene segue logic, 424-425
DateCalc project, 412
building apps, 425
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
implementation overview, 413
implementing scene segue logic, 424-425
DateChooserViewController, 414
adding, 413
dates, determining the differences between dates, 420
dates (NSDate), 130
Debug, 842
debug, Xcode, 33
DebuggerPractice project, 843-845
accessing Variable List, 852-853
breakpoint navigators, 853
Debug, 842
DebuggerPractice project, 843-845
lldb, 845
monitoring CPU and memory usage, 855-856
Release, 842
view hierarchy, checking, 856-858
decision making, 102
declaration, 142
declarations
class declaration, 84
constant declaration, 85
variable properties declarations, 84-85
declared in, 142
declaring
constants, 95
variables, 89
Boolean values, 91
data types, 89
integers and floating-point numbers, 89-90
object data types, 93
default images, ImageHop project, 257
default selections, 438
default simulated devices, 154
default states, FloraPhotographs project, 292
default transitions, 361
delegate protocols
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
description, 142
designing interfaces
BackgroundColor project, 540-541
BackgroundDownload project, 807
configuring map view, 732
ColorTilt project, 653
FieldButtonFun project, 224
adding styled buttons, 234
adding text fields, 225
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
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
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
MediaPlayground project, 685-686
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
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
details, loading/displaying, FloraPhotographs project, 300-302
Apple Developer Program, 10-11
joining paid Developer Program, 12-14
registering, 11
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
Dictionaries, 89
didRotateFromInterfaceOrientation, 577
different screen sizes, accommodating, 7
direct file system access, 530, 534-535
storage locations for application data, 535-536
direction image resources, Cupertino project, 769
directionArrow, 775
disabling
adaptive segues, 394
editing, Master-Detail Application template, 518
dismissDateChooser, 418
dismissing modal scenes, programmatically, 366
displaying
Address Book people picker, 734
compose view, BestFriend project, 743-744
images and details, FloraPhotographs project, 300-302
distanceFromLocation method, 764
distanceView outlet, 762
distantPast(), 95
doAcceleration, 660
doAlertInput, 337
document outline, storyboards, 149-152
document outline objects, storyboards, 153-154
browsing, 138
setting up documentation downloads, 136-137
Documents directory, 536
doMultipleButtonAlert, 335
Done button, keyboard hiding, 240-242
Double, 89
doVibration method, 343
downcasting, 97
downloading changes, source control, 865
downloads, documentation, setting up, 136-137
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
editing tools, Interface Builder (IB), 157
editor, Xcode, 33
Editor menus, 589
EditorViewController, 376
adding, 378
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
correcting with issue navigator, 54-57
placement errors, 588
Event Kit, 124
Event Kit UI, 121
exclamation mark (!), 197, 268
Exit icon, 151
view controllers, 381
loops
syntax, 103
extensions, OOP (object-oriented programming), 80
External Accessory, 125
feedback, iOS devices, 9
FieldButtonFun project, 217
building apps, 245
designing interfaces, 224
adding styled buttons, 234
adding text fields, 225
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
setting custom button images, 235-237
setting simulated interface attributes, 224
preparing button templates with slicing, 219-224
file formats, web views, 284
file paths, direct file system access, 536-537
file storage
implementation overview, 559-560
Survey project
setting up, 560
fileExistsAtPath, 537
files, removing, from Xcode projects, 37-38
filtering, 35
filters
media picker, 673
fireDate, 793
First Responder icon, 151
Flash Professional, 10
Float, 89
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
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
implementation overview, 499
setting up, 499
variables, 499
FlowerDetail project
application data source, 512-515
application data structures, 512-515
populating data structures, 515
detail view controllers, 519
displaying detail view, 520-521
master view controllers, 515
creating table view data methods, 515-516
disabling editing, 518
handling navigation events from a segue, 518-519
updating detail scenes, 511-512
updating master scenes, 510
web view outlets, 512
flowerView, 173
fonts, size classes, 826
Foundation, 124
foundPinch method, 628
foundSwipe method, 627
foundTap method, 627
frames, adding, in BestFriend project, 730
Accelerate, 125
Accounts, 123
adding, 684
Address Book, 123
Address Book UI framework, 121
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
Game Kit, 120
generating
output, from Playground, 110-112
generic view controller classes, adding, 459-460, 471
geographic north, 757
gesture recognizers, 614
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
replacing image views, 626
responding to tap gesture recognizers, 627
swipe recognizer, 627
building apps, 635
implementation overview, 614-615
shake recognizer, 632
getFlower, 172
getters, 85
GettingAttention project
alert sounds and vibrations, 341-343
creating multibutton alerts, 334-336
Git, 863
branching/merging, 865
committing changes, 864
downloading changes, 865
connecting to remote repositories, 868-869
Google Maps, 721
GPS, 751
grouped tables, 486
guides, 142
Interface Builder (IB), 157-158
gutters, 844
heading updates, Cupertino project, 771-772, 774-776
headingFilter, 775
headings
calculating, Cupertino project, 773-774
HealthKit, 124
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
iAd, 121
IB editor, 589
icons, app icons
universal applications, 817
IDE (integrated development environment), 29
identifier attribute, 534
identifiers, 359
Image I/O, 122
MediaPlayground project, photo library and camera, 697-698
image resources
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
application logic, 267
incrementing animation speed, 273-274
starting/stopping animation, 269-270
unreadable status bar, 274
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
adding outlets, 265
adding animation resources, 255
images
adding
to button templates, 220
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
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
implementation overview, 539-540
setting up, 540
implicit selection, custom picker views, 438
import declaration, class files, 83-84
incrementCount, 468
incrementCountFirst, 475
incrementCountSecond, 475
incrementCountThird, 475
incrementing
indexed tables, 486
initializing, interface objects, 603-604
initializing Core Motion Motion Manager, 656-657
initWithContentURL, 689
input. See also output
FieldButtonFun project, 217
building the app, 245
designing interfaces. See designing interfaces
preparing button templates with slicing, 219-224
iOS devices, 9
inspecting output from Playground, 110-112
installed size classes, configuring, 823
instance methods, OOP (object-oriented programming, 80
instances, OOP (object-oriented programming), 80
instantiation, 149
OOP (object-oriented programming), 80
Int, 89
interactions
labels, 216
text fields, 216
text views, 216
Interface Builder (IB), 147-148
Auto Layout system, 161
Content Compression Resistance, 162-163
connecting to code, 170
opening projects, 170
writing code, 178
customizing interfaces, 164
accessibility attributes, 165-167
editing tools, 157
overview, 148
previewing interfaces, 168-169
resources, 179
storyboards, 149
document outline objects, 153-154
user interfaces
adding object to views, 156-157
interface classes, 132
buttons (UIButton), 132
labels (UILabel), 132
pickers (UIDatePicker/UIPicker), 134
popovers
UIPopoverPresentationController), 134-135
sliders (UISlider), 133
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
setting simulated interface attributes, 199-201
iOS 7, 7
programmatically defined interfaces. See programmatically defined interfaces
responsive interfaces
designing rotatable and resizable interfaces, 576-578
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
lifecycle of iOS apps, 126-127
iOS Dev Center, 14
Apple Developer Program, 10-11
joining paid Developer Program, 12-14
registering as a developer, 11
application resource constraints, 8
connectivity, 9
feedback, 9
input, 9
registering multiple devices, 17
iOS Human Interface Guidelines, 180
adding addition simulated devices, 69-71
data storage, 535
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
screens, 6
iPod touch, 6
isAnimating, 269
issue navigator, correcting, errors, 54-57
items, navigation controllers, 448
JPEG images, 40
key constants, 540
ReturnMe project, 547
keyboard displays, customizing with text input traits, 228-229
keyboard hiding
FieldButtonFun project, 240-243
background touch, 242
Modal Editor project, 389
keyboard types, 229
keyboards
hiding, 564
virtual keyboards, 217
keychains, 17
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
launching
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
implementation overview, 458-459
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
implementation overview, 470
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
remote content, web views, 284-285
loadRequest, loading remote content, 284-285
Local Authentication, 125
local notifications, backgrounding, 784-785, 792
properties, 793
requesting authorization for notifications, 792
local repositories, Git, 866-868
location accuracy, Core Location, 756
location constants, Cupertino project, 759-760
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
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
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
low-level code, 446
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 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
map view delegate protocol, 724-725
maps, BestFriend project. See BestFriend project
master scenes, updating, 510
master view controllers, 497
FlowerDetail project, 515
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
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
filters, 673
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 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
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
preparing music player, 703-704
user’s selection, 705
photo library and camera, 697-700
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
versus functions, 190
MFMailComposeViewController, 742
Misplaced Views error, 587
MKMapView, 728
MKMapViewDelegate protocol, 740
Modal Editor project, 377
hiding keyboards, 389
connections, 381
implementation overview, 377
modal segues, creating, 384-385
popovers
toggling to universal applications, 392-393
unwinding back to the initial scene, 386
variables, 381
modal scenes, dismissing, programmatically, 366
modal segues
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
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
MPMediaItemCollection, 670, 674
MPMediaPickerController, 670, 673-674
MPMoviePlayerController, 670
MPMusicPlayerController, 670
multibutton alerts, creating, 334-336
multiscene development, view controllers, 446
multiscene projects, 352
modal segues
presenting manually, 366
passing data between scenes, 375-377
popover segue, configuring, 362-365
PopoverPresentationControllerDelegate Protocol, 374
segues
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
music library
displaying media picker, 704-705
empty selections, 706
MediaPlayground project, 702
preparing music player, 703-704
user’s selection, 705
music player, 675
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
myInstanceMethod, 97
myOptionalString, 97
named parameters, 100
navigating
code, Xcode, 42
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
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
NSFileHandle, 538
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
object data types, 93
Object Library, user interfaces, 154-155
object-oriented programming. See OOP (object-oriented programming)
imperative programming, 78
object-oriented approach, 78-79
objects, 513
adding
to scrolling view, 308
OOP (object-oriented programming), 80
onscreen controls (UIControl), 129
OOP (object-oriented programming), 78-79
OpenGL ES, 122
opening projects, Interface Builder (IB), 170
optional chaining, 101
orientation
constraints. See constraints
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
Cupertino project, 762, 769, 771
FieldButtonFun project, 237-239
FloraPhotographs project, 295-298
GettingAttention project, 331-333
Interface Builder (IB), 172-178
MediaPlayground project, 687-688
Orientation project, 649
ReturnMe project, 549
Scroller project, 310
Single View Application template, 203-207
SlowCount project, 802
output. See also input
from Playground, generating and inspecting output, 110-112
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
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
requesting to use user’s location, 737-738
photo library, MediaPlayground project, 697-700
Photos framework, 122
PhotosUI, 121
picker view data source protocol, 408-409
advanced delegate methods, 410-412
picker view data source protocol, 408-409
picker view delegate protocol, 409-410
custom pickers. See custom pickers
date pickers, 406
projects. See DateCalc project
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
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
FieldButtonFun project, 244
generating and inspecting output, 110-112
testing, user notifications, 324-325
using, 110
playing
alert sounds with vibrations, 342
System Sound Services, 341-342
playMovieFinished, 672
playMusic method, 706
plist files
requesting, 752
updating, 766
PNG images, 40
pop, 447
popover segue, configuring, 362-365
popoverPresentationController, 394
popovers, 134-135, 340, 371-374, 439
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
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
planning variables and connections, 197-199
SlowCount project. See SlowCount project
source control, 871
pulls, 874
updates, 874
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
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
public, 87
pulls, source control projects, 874
push, 447
push count variable property, adding, 468
pushCount, 463
pushes, source control projects, 873-874
Quartz Core, 122
activating Quick Help Inspector, 141-142
Quick Help Inspector, activating, 141-142
Quick Inspector, editing, connections, 177
Quick Look, 124
quitting apps, 209
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
recordAudio method, 693-694, 696
recorded sound, loading, 696-697
registering
as a developer, Apple Developer Program, 11
multiple devices, 17
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
connecting to remote repositories, 868-869
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 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
programming interfaces, 577
size classes, 578
restoration, pseudo preferences, 529-530
retina display, hi-res images, loading, 258
Retina image files, 61
Retina-naming convention, 42
return statement, 575
ReturnMe project
building apps, 559
designing interfaces, 548
outlets, 549
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
Core Image, 682
UI image picker controller delegate, 680-682
Media Player framework, 670-671
accessing media items, 675-676
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
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
rotationRate, 646
running
sandbox, 535
scaling, 294
scene segue logic
LetsTab project, 472
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
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
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
adaptive segues, 358
disabling, 394
CustomPicker project, 431
DateCalc project, 417
Modal Editor project, 377
implementation overview, 377
modal segues
presenting manually, 366
popover segue, configuring, 362-365
programming from scratch, 369-371
show segues, adding navigation scenes, 451-452
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
designing interfaces, 648
outlets, 649
setting up, 647
setBackgroundHueValue method, 542-544
setFullscreen:animated, 689
setMessageBody:isHTML, 742
setMiminumBackgroundFetchInterval, 808
setObject:forKey, 531
setOutput method, 208
setters, 85
Settings application, 528, 546-547
implementation overview, 547
designing interfaces, 548
outlets, 549
settings bundles, 528, 530, 532-534, 547
Settings icon, 61
setToRecipients method, 719
setValuesFromPreferences, 557-558
shake recognizer, 632
shaking, 612
sharing data
between navigation scenes, 452
between tab bar scenes, 457-458
show segues
adding, navigation scenes, 451-452
showing
detail web views, FloraPhotographs project, 298-300
survey results, Survey project, 565-567
showResults method, 566
signing identity, 17
simulated devices
rotating, 67
simulated interface attributes
FieldButtonFun project, 224
Single View Application template, 191
application logic, implementing, 208
applications, building, 208-209
planning variables and connections, 197-199
singleton, OOP (object-oriented programming), 80
size classes
Any, 833
configuring installed, 823
designing rotatable and resizable interfaces, 578
fonts, 826
setting active size classes, 821-823
tools, 821
universal applications, 818-820
Size Inspector
Interface Builder (IB), 159-161
sizes, matching, constraints, 598-600
sizing, 490
controls, FloraPhotographs project, 291
popovers, 363
SLComposeViewController, 720
button templates, 219
adding images, 220
slider range attributes, setting, 259-261
adding, ImageHop project, 259
ImageHop project. See ImageHop project
SlowCount project
background task processing, 804-805
designing interfaces, 802
implementation overview, 800
outlets, 802
setting up, 801
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
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
pulls, 874
updates, 874
repositories, 864
working copies, 864
space, data storage, 536
speed, animation speed
speed output labels, adding, 262
split view controllers, 495
hierarchies, FlowerDetail project, 509
Master-Detail Application template, 497-498
splitViewController, 497
startAnimating, 269
starting
animation, ImageHop project, 269-270
segues, 366
startUpdatingLocation method, 763
status bars
Cupertino project, 766
unreadable status bar, 274
status codes, source control, projects, 871-872
stepper range attributes, setting up, 261-262
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
storing
BackgroundColor preferences, 544-545
storyboard feature, 446
storyboard files, Single View Application template, projects, 195-197
storyboard identifiers, setting, 369
storyboard segues, 446
Interface Builder (IB), 149
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
adding tab bar scenes, 456-457
setting tab bar item attributes, 455-456
universal applications, 818
stringForKey, 532
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
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
setting up, 560
survey results
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
automatic reference counting, 107
class declaration, 84
constant declaration, 85
ending, 87
variable properties declarations, 84-85
Xcode, 88
decision making, 102
declaring variables and constants, 89
Boolean values, 91
constants, 95
data types, 89
integers and floating-point numbers, 89-90
object data types, 93
memory management, 107
methods
chaining, 101
closures, 102
object-oriented programming, 77-78
properties versus variables, 189
type casting, 95
Swift type conversion, 94
swipe recognizer, 621
swipe recognizer responding to, 627
swiping, 612
adding, in FloraPhotographs project, 291
symbol navigator, Xcode, 43
synchronize method, 532
syntax
expressions, 103
System Configuration, 125
System framework, 125
System Sound Services, 325-326, 796
alert sounds and vibrations, 327-328
SystemSoundIDs, 796
tab bar controller classes, adding, 471
tab bar controllers, 445, 452-453
projects, 469
LetsTab project. See LetsTab project
adding tab bar scenes, 456-457
setting tab bar item attributes, 455-456
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 relationships, creating, 472-473
tab bar scenes
Tabbed Application, 454
tabbed editing, Xcode, 50
table attributes, setting, 488-489
table cells, 487
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
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
task completion for long-running tasks, backgrounding, 785-786
task-specific background processing, 785, 795
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
text, plain versus attributed, 227
text field attributes, customizing keyboard displays, 228-229
adding, to FieldbuttonFun project, 225
text view attributes, editing, 231-232
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
toggleAnimation method, 269
toggleFlowerDetail, 288
toggleSwitch, 540
toggling to universal applications, 392-393
toolbar, Xcode, 33
toolbars, 401
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
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
UI elements, 401
pickers. See pickers
toolbars. See toolbars
UI image picker controller delegate, 680-682
UIAlertController, 318
UIApplication, 128
UIBackgroundTaskIdentifier, 801
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
UILocalNotification, 784-785, 792
UILongPressGestureRecognizer, 612
UInt32(), 327
UIPanGestureRecognizer, 612
UIPicker, 134
UIPickerViewDelegate, 409
UIPinchGestureRecognizer, 612
UIPopoverPresenationController, 134-135
UIPopoverPresentationControllerDelegate Protocol, 374
UIRotationGestureRecognizer, 612, 622
UIScreenEdgePanGestureRecognizer, 612
UIScrollView, 312
UISegmentedControl, 133
UISlider, 133
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
storyboards, 818
targets, 819
toggling to universal applications, 392-393
unreadable status bar, ImageHop project, 274
unwind, 351
unwind destinations, determining dynamically, 368
unwinding back to the initial scene, Modal Editor project, 386
exclamation mark (!), 284
update filters, Core Location, 756
Update Frames, 382
updates, source control projects, 874
updating
Cupertino project, application logic, 771-776
master scenes, 510
plist files, 766
user interfaces, Cupertino project, 769-770
URLs (NSURL), 131
user interfaces
adding object to views, 156-157
updating, Cupertino project, 769-770
user notifications, 317
alert controllers, 318
responding to actions, 321-322
GettingAttention project. See GettingAttention project
System Sound Services, 325-326
alert sounds and vibrations, 327-328
userAcceleration, 646
utility, Xcode, 33
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
declaring, 89
Boolean values, 91
data types, 89
integers and floating-point numbers, 89-90
object data types, 93
FloraPhotographs project, 288
FlowerColorTable project, 499
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
versus properties, 189
SlowCount project, 801
verifying connections, Connections Inspector, 625
Version editor, viewing revisions, 875-876
vertical constraints, 581
verticalAccuracy, 753
View Controller Scene, 150
View Controller Simulated Size, resetting, 309
view controller subclasses, 355-356
view controllers, 129, 351, 445-446
LetsTab project, 472
exits, 381
mail compose view controller delegate, 719
multiscene development, 446
MVC (Model-View-Controller), 188
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
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
views (UIView), 128
virtual keyboards, 217
Voiceover, 165
waitView outlet, 762
warnings, fixing, with issue navigator, 54-57
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
whiteButton.png, 220
Wi-Fi, 9
willRotateToInterfaceOrientation:duration method, 578
windows object (UIWindow), 128
Windows options for development, 10
working copies
source control, 864
writing
code, Interface Builder (IB), 178
data, direct file system access, 537-538
building apps, 52
correcting errors with issue navigator, 54-57
code
activating tabbed editing, 50
adding marks, to do’s and fix me’s, 47-48
editing, 42
navigating, 42
searching with search navigator, 46-47
symbol navigator, 43
constraints, 579
device orientations, 59
browsing, 138
setting up documentation downloads, 136-137
managing project properties, 58
projects, 30
adding new assets catalogs, 38
adding resources, 37
removing files and resources, 37-38
Xcode Asset Catalog, 38
activating Quick Help Inspector, 141-142
resources, 180
settings bundles, creating, 549-556
Xcode 6 Debug View Hierarchy, 856
Xcode Asset Catalog, 38
Xcode editor, 42
Xcode slicing tool, 219