Introduction to iOS Programming with Swift

How to write apps for the iPhone and iPad (Four days)

Who it's for


This four day introductory course is for experienced developers who are new to Swift and modern iOS app development.

What you'll learn


This course will introduce you to the fundamentals of iOS 10 app development using Swift 3 on Xcode 8.

The first day of the class will get you up to speed with the Swift Programming language. We spend the day in playgrounds, exploring the ins and outs of programming with Swift.

On day two we dig deeper into idiomatic Swift and work with functions as closures, higher-order functions, sequences, and handling errors.

The third and fourth days introduce iOS 10 application development. We begin with single view, create a UI and connect it to code using the latest techniques introduced for iOS 10. We work with MVC and MVVM and then move on to apps with multiple scenes. You will learn a variety of methods of presenting and dismissing scenes while communicating information between the view controllers. We'll also look at table views, navigation controllers, and tab bar controllers. We'll take a quick look at Core Data and web services.

What you need


You need a Mac running El Capitan or Sierra with the latest publicly shipping version of Xcode 8.x installed. You'll work with Xcode projects and playgrounds and also the iOS Simulator throughout the course.

Booking Info


For information about booking a course for your group, company, or public event or more details on course content, contact booking@editorscut.com.

Syllabus


Swift Kickstart

A Simple iOS Project

Hello, World! (it's kind of the law)

Quick introduction to Xcode 8

A moment with GUI creation in Interface Builder

Swift Properties and Methods

Connecting Outlets and Actions in Swift

The iOS lifecycle

Meet the iOS Simulator

Language Fundamentals

Functions

Explore a playground in Xcode 8

Create and call functions

Function overloading in Swift

Default values for parameters

Local and external parameter names

Tuples and variadic parameters

Variables and Constants

Strong type inference in Swift

Let vs. Var

No promotion of numeric types

Where spaces matter

Functions as objects

Optionals and Nil

Collections

Create and modify arrays

Collections are homogeneous

Iterating an array

Value and Reference Types

Create and modify dictionaries

A Quick look at Sets

Types and Instances

Classes

Base classes

Subclasses

Stored and Computed Properties

By-reference semantics

The init method

Convenience methods

More optionals

Overriding methods

Enumerations

Case

Switch

Raw values and more optionals

Methods

Computed properties

As property types

Value Types

Associated values

Structs

Properties

By-value semantics

Default init

Getters and setters

Did set and will set

Mutating methods

Protocols

Collecting commonality

Conforming

Polymorphism

Self

Generics

Protocol extensions

Extension points

Thinking in Swift

Flexible Functions

Understanding Parameters

Inout parameters

Closures

Generics

Extensions

Mutable Model

Non-Mutable Model

Sequences

Distributions

Raw Representables

while let/p>

Iterators

Sequences

Subscripts

When Things Go Wrong

Asserts

ErrorProtocol Structs

ErrorProtocol Enums

Throws

Try/Catch

Defer

Guard Let

Rethrow

Higher-Order Functions

Returning a Function

Returning a Closure

Consuming a Closure

Mapping Arrays

Classic Examples

Map

Filter

Reduce

FlatMap

Functors and Monads

iOS App Fundamentals

Meet Xcode

Create a new project

Navigators

Inspectors

Console

iOS Simulator

A simple UI

The Storyboard

Initial Scene

Libraries

Buttons and labels

Attribute Inspector

Constraints, Autolayout, and Stack Views

Outlets and Actions

Create and configure an outlet and outlet collection

Use the outlet and outlet collection

Create and configure multiple actions

Connection Inspector

Implement the actions

Communication

Model View Controller

Understanding View Controllers

Breaking up View Controllers

MVVM

Notifications

Passing closures

Simple Models

Custom UI

View Subclasses

Targeting multiple devices

Device specific layouts

Localizing the Storyboard

Localizing Strings

Creating and using designables

Inspectable properties

Multiple Scenes

One App with Two Scenes

Add view controller to storyboard

Configure the second scene

Create a button to trigger the segue

Create and configure a segue

Manual Transitions

Custom view controller subclass

Provide a public property

Implement action to present second scene

Create behavior to dismiss second scene

Forward information

Use the information

Segues

Connect Segue from first to second scene

Implement prepareForSegue()

Create Unwind Segues

Create custom segue subclasses

Pass information back and forth

Enhance the UI

Gesture Recognizers

Image Views

Asset Catalogue

Animation

Modules

Separate Storyboards

Storyboard References

Add a framework

Present content in a separate module

Communicate information forward and back

Minimize coupling

Delegates

Connect the delegate

Conform to delegate protocol

Closures as an alternative

Table View Based Apps

Separating Concerns

New project using MVVM/MVC

Gestures

Complicating the model

Using the Module for Insert

Simple Persistence with User Defaults

Table Views

Delegate and Data Source

Connecting to the same model with a different view model

Enable Delete and Move

Using the Module for Insert

Assembling apps from pieces

Notifications

Tab Bar Controller

Nav Controllers

Connecting multiple scenes

Network Applications

Core Data

Create the data model

Generated classes

The Core Data Stack

The Context on the Main Queue

Background Contexts

JSON

Asynchronous Network Calls

Handling Response

Parsing JSON

Creating Model object

CRUD and Saving to Core Data

Custom Cells

The Data Source and View Model

Cell access to model instance

Cell knowledge of view

Filling the custom cell

Passing Info

Prepare for segues

Segue dependent set up

Passing selected entity to next Controller

Retrieving information for entity from Core Data

Displaying the results

Collection Views

Collection View Data Source

Custom Cell

Gathering relevant information

Displaying the results