Installing Xcode, Your Code Editor
Adding User Interface Elements with the Object Library
Running the App on a Real Device
2
LEARNING TO CODE IN A PLAYGROUND
When to Use Constants vs. Variables
Naming Constants and Variables
Transforming Data Types with Casting
Ordering Operations with Parentheses
Looping Through Ranges and Collections with for-in
Testing Conditions with while Loops
5
KEEPING YOUR PROGRAMS SAFE WITH OPTIONALS
A Special Kind of Operator: ??
6
STORING COLLECTIONS IN DICTIONARIES AND ARRAYS
Keeping Things in Order with Arrays
Using Mutable and Immutable Arrays
Accessing Values in a Dictionary
Removing Items from a Dictionary
Replacing Items in a Dictionary
7
FUNCTIONS ARE A PARTY, AND YOU’RE INVITED
In with the Input, Out with the Output
Functions Do Even More with Input Parameters
Inviting All Your Friends at Once
Adding a Custom Argument Label
Storing Information in Properties
Creating an Instance of a Class
Accessing the Properties of a Class
Customizing Each Cake with Initializers
Adding a Birthday Greeting Method
A Special Property Called self
Detecting the Data Type by Typecasting
Refining the Data Type by Downcasting
Value Types and Reference Types
9
CREATING BUTTONS AND SCREENS ON THE STORYBOARD
Displaying Your Friends’ Birthdays
Adding the Table View Controller
Adding the Navigation Controller
Setting Up Control Inputs and Labels
Adding Your Friends’ Names and Birthdays
Making Your App Look Perfect on Every Device with Auto Layout
Adding Save and Cancel Buttons
10
ADDING A BIRTHDAY CLASS AND HANDLING USER INPUT
Creating the Add Birthday View Controller
Connecting Code to the Input Controls
Connecting Your Code to the Storyboard
Reading Text from a Text Field
Getting a Date from a Date Picker
Creating the Birthdays Table View Controller
Adding Cells to the Table View
Setting Up the Birthdays Table View Controller
Displaying Birthdays in a Table View
Connecting the Two Controllers by Setting a Delegate
Storing Birthdays in a Database
Adding More Features to Our App
13
GETTING BIRTHDAY NOTIFICATIONS
The User Notifications Framework
Registering for Local Notifications
PART 3: SCHOOLHOUSE SKATEBOARDER
Where Do I Get Art and Sound Effects?
Making Games with Xcode’s SpriteKit
The Scenery: Displaying a Background Image
How It Will Be Played: Screen Orientation
Sizing Images for Different Screen Resolutions
15
MAKING SCHOOLHOUSE SKATEBOARDER A REAL GAME
Creating a Skater Sprite Class
Adding Custom Properties to the Skater Class
Creating an Instance of the Skater in the Scene
Seeing the Skater on the Screen
Understanding SpriteKit’s Debugging Information
Filling the Screen with Bricks
Calculating Elapsed Time for Each Update
Adjusting Scroll Speed Using the Elapsed Time
Up, Up, and Away—Making the Skater Jump
Using a Tap Gesture Recognizer
Simulating Gravity in a Simple Way
16
USING THE SPRITEKIT PHYSICS ENGINE
Giving Shape to the Physics Bodies
Setting Properties of Physics Bodies
Giving the skater Sprite a Physics Body
Adding Physics Bodies to Bricks
Handling Contacts and Collisions
Applying Forces to Physics Bodies
17
ADJUSTING DIFFICULTY, COLLECTING GEMS, AND KEEPING SCORE
Defining Multiple Brick Levels
Spawning and Tracking the Gems
18
GAME STATE, MENUS, SOUNDS, AND SPECIAL EFFECTS
Displaying the Menu Layers When Needed
Playing the Sounds at the Right Time