Choose your language:

France
Germany
Hong Kong
India
Ireland
Japan
Malaysia
Netherlands
New Zealand
Singapore
Sweden
United Kingdom
United States

Programming in Swift

Course Code

IN1562

Duration

3 Days

Previous programming experience is recommended but not mandatory.

Basic familiarity with Mac computers and working in Mac OS X is recommended.

With Swift, Apple has introduced a fast and innovative new programming language aimed specifically at iPhone, iPad and OS X App Development. Modern and concise, Swift represents a major departure from Objective-C in both structure and syntax as it introduces many new programming concepts. This course will thoroughly cover all the major features of Swift, from variable and constants declarations to working with Collection Objects, Optionals, Variadic and Curried Functions, Tuples, Closures, Control-Flow statements, and the creation of custom Swift Classes.

This 3-day course is aimed at creating a solid foundation in Swift programming so as to easily enable moving towards iPhone, iPad and OS X App Development using Swift.
This course is designed for beginner programmers, as well as experienced programmers who are not familiar with Swift.

Upon completion of this course, participants will be able to:

  • Learn to declare Variables and Constants, use Swift's different Data Types and perform Type-Casting operations
  • Create Custom Classes, use Inheritance and Subclassing
  • Write Functions (basic, curried, variadic) and class Methods
  • Work with Optional variables, Optional Chaining, Forced Unwrapped Optionals
  • Create Collection Objects using Arrays and Dictionaries
  • Declare and implement custom Protocols
  • Write Structs and Enums
  • Create initializers, learn about Designated initializers, Convenience initializers and Initializer Delegation
  • Write full-fledged Swift Apps
Creating and Running a Swift Project in Xcode
A.Xcode IDE overview
B.Creating and using Playgrounds
C.Building and testing programs – the workflow

II.Working with Data Types, Variables & Constants
A.Variables and Constants
B.Data Types: Ints, Floats, Doubles, Bools, Chars, AnyObject
C.Strings – Literals, Mutability, Interpolation, Concatenation
D.Type Inference & Type-Safety
E.Type Casting
F.Unicode characters in Variable declaration

III.Working with Collection Objects
A.Arrays
1.Array Literals
2.Creating and Initializing Arrays
3.Accessing & Modifying Arrays
4.Iterating over Arrays
5.Assignment and Copy Behavior for Arrays
B.Dictionaries
1.Dictionary Literals
2.Initializing
3.Modifying Dictionaries
4.Iterating over Dictionaries
5.Assignment and Copy Behavior for Dictionaries
C.Collections Sequence Operations
1.Map
2.Filter
3.Reduce

IV.Control-Flow
A.Conditionals
1.IF and Ternary Statements, Compound Relationals
2.Switch Statement – switch with Strings, Range-Matching, Tuples, Value Bindings, WHERE clauses
3.Control Transfer Statements – Continue, Break, Fallthrough, Return
B.Loops
1.FOR loops, FOR-IN loops, FOR-Condition-Increment
2.WHILE loops, DO-WHILE loops

V.Writing Classes in Swift
A.Declaring a Swift class in a separate file
B.Declaring Stored and Computed Properties
C.Lazy Stored Properties
D.Working with Property Observers
E.Creating Instance Methods
F.Creating class Methods & class Properties
G.Creating init Methods
H.Designated Initializers, Conveniences Initializers, Initializer Delegation
I.Deinitialization
J.Class Extensions

VI.Inheritance
A.Base Classes, Creating Subclasses
B.Overriding Methods & Properties
C.Preventing Overrides

VII.Optionals
A.Forced Unwrapping
B.Optional Binding
C.Implicitly Unwrapped Optionals
D.Optional Chaining

VIII.Functions
A.Basic, Argumented and Variadic Parameters Functions
B.inout Parameter Value Functions, Default Parameter Value Functions
C.Curried Functions and Nested Functions
D.Functions with Return types, Functions Returning Multiple/Tuple Types
E.Functions returning other Functions

IX.Structures
A.Properties & Methods
B.Memberwise Initializers
C.Structures vs. Classes

X.Enumerations
A.Declarations
B.Matching with Switch Statements
C.Associated Values
D.Raw Values

XI.Generics
A.Generic Functions
B.Generic Types
C.Type Parameters
D.Extending Generic Types
E.Associated Types

XII.Protocols
A.Protocol Declarations and Syntax
B.Property and Methods Requirements
C.Requiring Initializers
D.Protocol Types
E.Swift Standard Library Protocols
F.GeneratorType, SequenceType, CollectionType
G.Protocol Inheritance

XIII.Closures
A.Closure Expressions & Syntax
B.Closure Context Type Inferrence
C.Shorthand Argument Names
D.Trailing Closures

XIV.Error Handling
A.Prevent Crashes due to System Generated Errors
B.Expose and Get Detailed Information on Thrown Errors
C.Create User-Defined Error-Types using the ErrorType Protocol
D.Create Custom Functions to Throw Custom Errors

XV.Additional Topics
A.Incorporating Objective-C classes in a Swift Project
B.Incorporating Swift classes in an Objective-C Project
C.Debugging
D.Unit Testing

Send Us a Message
Choose one