Code: 
AMS425
Duration: 
0.5-3 Day(s)
Price: 
£1500-1995

Overview

Swift is Apple's replacement for the Objective C language, that seeks to simplify the process of coding and modernise the language used for creating iOS and OS X apps.

Audience

This course is ideal for anyone who wants to have a thorough walkthrough of the language in more detail than on the standard iOS course, and is perfectly suited to anyone who has studies iOS/

OSX

development, and wants to cross over from Objective C into Swift.

Prerequisites

This course assumes basic knowledge of coding, and will be making references to the iOS APIs when demonstrating how to implement swift.

Skills Gained

Swift is Apple's replacement for the Objective C language, that seeks to simplify the process of
coding and modernise the language used for creating iOS and OS X apps. Swift manages to
combine the power of an object orientated programming language - using controlled data-types
and high level patterns of development - with the simplicity and ease of use of a scripting
language. Cherry-picking many of the best concepts from other modern languages, Swift seeks to
fix many inconstancies and dangers found in traditional coding, and offer the opportunity for
developers to create new source code that is highly reduced from older Objective C patterns. Code
written in Swift is easier to maintain, and allows more scope to experiment with the new
Playgrounds feature found in Xcode.
This course assumes basic knowledge of coding, and will be making references to the iOS APIs
when demonstrating how to implement swift. This course is ideal for anyone who wants to have a
thorough walkthrough of the language in more detail than on the standard iOS course, and is
perfectly suited to anyone who has studies iOS/

OSX

development, and wants to cross over from
Objective C into Swift.

Course Specifics

Course Outline

Introducing Swift
- Origins of Swift
- Why abandon Objective C and C
- Grammatical/lexical base for the language
- Links to other languages
- Relationship to iOS APIs and

OSX

APIs
- Playgrounds and Xcode
- Swift and Objective C working together

Basic constructs of Swift code
- Basic datatypes, operators and logic
- Variables and Constants
- Type annotation, type safety and types inference
- Type conversion and casting
- New Swift Strings
- Processing, concatenating and analysing strings
- New datatypes for Arrays and Dictionaries
- Relationships to Foundation and NSString/NSArray/NSDictionary
- Printing to the Log

More advanced data patterns
- Type aliases
- Tupples
- Optionals – how to use and hidden dangers
- Optional bindings
- nil, how it compares to

NULL

and nil in

Objective C
- Assertions and debugging
- For loops and range operators
- Half closed range operator

Collections
- Arrays
- Literal arrays
- Modifying and accessing
- Mutable or Immutable?
- Differences from NSArray
- Dictionaries
- Comparing NSDictionary
- Iterating collections

Control flow
- For, do, while
- If, Else
- Switch/Case
- Swifts changes to traditional code
- Dealing with implicit fall through
- Range matching
- Bindings, where
- Control transfer, break, continue
- Labelled statements

Functions
- Defining and calling functions
- Function parameters and return values
- Default parameters, parameter names
- External and shorthand parameter names
- Variadic parameters
- Constant and variable parameters
- In/Out Parameters
- Function types
- Nested functions
- Scope and closures
- Closure expressions
- Trailing closures and shorthand
- Capturing scope
- Closures as a reference type

Classes, Structures and Enumerators
- Difference between Objective C, C and Swift
- Structures in Swift
- Classes in Swift
- Comparing Structures and Classes, when to use one or the other
- Properties and methods
- Memberwise initialisers
- Structures and Enumerators, a comparison
- Classes as reference types
- Identity operators
- Introspection
- Assignment and copy behaviour
- Forcing copies
- Stored properties
- Constants
- Lazy loading
- Computed properties
- Getters and setters
- Read only and computed values
- Property observers
- Global and Local variables
- Type properties
- Instance Methods
- Local and external parameter names for methods
- Self (this)
- Subscripts
- Inheritance
- Base classes and subclassing
- Overriding
- Super class and subclass methods
- Preventing overrides
- Initialisations - Delegation
- Initialiser Delegation for Value Types
- Class inheritance and initialisation
- Initialiser chaining
- Safety checking and automatics
- Default properties within closures and functions
- Deinitialisation
- Automatic Reference Counting

ARC


- Strong and weak references
- Unowned references
- Strong reference cycles for closures

Patterns
- Model View Control
- Optional chaining
- Calling via optional chaining
- Extensions
- Nested types
- Protocols and Delegation
- extensions and inheritance
- composition and conformance
- Generics
- Type Parameters and constraints
- Associated Types
- Where clauses

Advanced Operators
- Bitwise operators
- Precedence and Associativity
- Operator Functions
- Prefix and Postfix Operators
- Compound Assignment Operators
- Equivalence Operators
- Custom Operators

Applying Swift to your projects
- Working with Foundation, UIKit and other Apple APIs
- Plans for migrating your code from Objective C to Swift
- Using Swift with objective C
- Extending existing Objective C classes with Swift
- Building some simple swift applications

Thinking about Onsite?

If you need training for 3 or more people, you should ask us about onsite training. Putting aside the obvious location benefit, content can be customised to better meet your business objectives and more can be covered than in a public classroom. It's a cost effective option.

Submit an enquiry from any page on this site, and let us know you are interested in the requirements box, or simply mention it when we contact you.

Upcoming Dates

Please click date to Enquire Now
Course Location Days Cost Date
Birmingham3 1500 £1500 2017-10-24
Belfast3 1500 £1500 2017-10-16
Bristol3 1500 £1500 2017-10-09
Exeter3 1500 £1500 2017-10-02
London1 1995 £1995 2017-09-18
Liverpool3 1500 £1500 2017-09-14
Oxford3 1500 £1500 2017-09-12
Reading3 1500 £1500 2017-09-08
Glasgow3 1500 £1500 2017-09-05
London1 1995 £1995 2017-08-07
Bath3 1995 £1995 2017-07-10
Bath3 1995 £1995 2017-07-05