! (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
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
application logic, 543
reading preferences, 545
implementation overview, 539-540
setting up, 540
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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