Home Page Icon
Home Page
Table of Contents for
Title
Close
Title
by Brad Lees, Gary Bennett
Swift 2 for Absolute Beginners
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Becoming a Great iOS Developer
Thinking Like a Developer
Completing the Development Cycle
Introducing Object-Oriented Programming
Working with the Playground Interface
Summary
What’s Next
Exercises
Chapter 2: Programming Basics
Touring Xcode
Exploring the Workspace Window
Navigating Your Workspace
Editing Your Project Files
Creating Your First Swift Playground Program
Installing and Launching Xcode 7
Using Xcode 7
Xcode Playground IDE: Editor and Results Areas
Summary
Exercise
Chapter 3: It’s All About the Data
Numbering Systems Used in Programming
Bits
Bytes
Hexadecimal
Unicode
Data Types
Declaring Constants and Variables
Optionals
Using Variables in Playgrounds
Summary
Exercises
Chapter 4: Making Decisions, Program Flow, and App Design
Boolean Logic
Truth Tables
Comparison Operators
Designing Apps
Pseudocode
Optionals and Forced Unwrapping
Flowcharting
Designing and Flowcharting an Example App
The App’s Design
Using Loops to Repeat Program Statements
Coding the Example App in Swift
Nested if Statements and else if Statements
Removing Extra Characters
Improving the Code Through Refactoring
Running the App
Design Requirements
Summary
Exercises
Chapter 5: Object-Oriented Programming with Swift
The Object
What Is a Class?
Planning Classes
Planning Properties
Planning Methods
Implementing the Classes
Inheritance
Why Use OOP?
OOP Is Everywhere
Eliminate Redundant Code
Ease of Debugging
Ease of Replacement
Advanced Topics
Interface
Polymorphism
Summary
Exercises
Chapter 6: Learning Swift and Xcode
A Newcomer
Understanding the Language Symbols
Implementing Objects in Swift
Writing Another Program in Xcode
Creating the Project
Summary
Exercises
Chapter 7: Swift Classes, Objects, and Methods
Creating a Swift Class
Instance Variables
Methods
Using Your New Class
Creating Your Project
Adding Objects
Writing the Class
Creating the User Interface
Hooking Up the Code
Running the Program
Taking Class Methods to the Next Level
Accessing the Xcode Documentation
Summary
Exercises
Chapter 8: Programming Basics in Swift
Using let vs. var
Understanding Collections
Using Arrays
Using the Dictionary Class
Creating the BookStore Application
Creating Your Class
Introducing Properties
Accessing Variables
Finishing the BookStore Program
Creating the View
Adding Properties
Adding a Description
Creating a Simple Data Model Class
Modifying MasterViewController
Modifying the DetailViewController
Summary
Exercises
Chapter 9: Comparing Data
Revisiting Boolean Logic
Using Relational Operators
Comparing Numbers
Creating an Example Xcode App
Using Boolean Expressions
Comparing Strings
Using the switch Statement
Comparing Dates
Combining Comparisons
Summary
Exercises
Chapter 10: Creating User Interfaces
Understanding Interface Builder
The Model-View-Controller Pattern
Human Interface Guidelines
Creating an Example iPhone App with Interface Builder
Using Interface Builder
The Document Outline
The Library
Inspector Pane and Selector Bar
Creating the View
Using Outlets
Using Actions
The Class
Summary
Exercises
Chapter 11: Storing Information
Storage Considerations
Preferences
Writing Preferences
Reading Preferences
Databases
Storing Information in a Database
Getting Started with Core Data
The Model
Managed Object Context
Setting Up the Interface
Summary
Exercises
Chapter 12: Protocols and Delegates
Multiple Inheritance
Understanding Protocols
Protocol Syntax
Delegation
Protocol and Delegation Example
Getting Started
How It Works
Summary
Exercise
Chapter 13: Introducing the Xcode Debugger
Getting Started with Debugging
Setting Breakpoints
Using the Breakpoint Navigator
Debugging Basics
Working with the Debugger Controls
Using the Step Controls
Looking at the Thread Window and Call Stack
Debugging Variables
Dealing with Code Errors and Warnings
Errors
Warnings
Summary
Chapter 14: A Swift iPhone App
Let’s Get Started
App Summary
Exercises
Chapter 15: Apple Watch and watchKit
Considerations When Creating a watchOS App
Creating an Apple Watch App
Adding More Functionality
Summary
Exercises
Chapter 16: A Swift HealthKit iPhone App
Introduction to Core Bluetooth
Central and Peripheral Devices
Peripheral Advertising
Peripheral Data Structure
Let’s Get Started and Build the App
App Summary
What’s Next?
Exercises
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
Swift 2 for Absolute Beginners
Gary Bennett
Brad Lees
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset