RAPID LEARNING SWIFT
RAPID LEARNING SWIFT
$10.00
Minimum price
$20.00
Suggested price
RAPID LEARNING SWIFT

This book is 80% complete

Last updated on 2015-11-06

About the Book

 

Info

SWIFT is object oriented programming language for building applications for OSX and iOS operating systems.

SWIFT home page is at https://developer.apple.com/swift/.

 

Book content

This book is collection of standalone tutorials.

This means that each tutorial contains minimum amount of code needed to explain specific functionality.

This is in contrast to building a single application where each new functionality is added on top of already explained ones.

Each tutorial has minimum amount of supporting text making emphasis on the code example to do the explaining.

 

How to use this book

This book can be used as an introduction to SWIFT language covering all of the basic core functionalities.

In addition book will be updated with more tutorials covering more specific subjects.

Book is also intended as Just In Time Support so that user can learn what it needs when it needs it.

This is why tutorials are standalone and minimalistic focusing only at one problem at the time.

You should however first go through the main features of SWIFT to familiarize yourself with the core concepts.

This can be done by first going through the main chapters as deep as you see fit.

Then later you can come back to explore other more specific chapters as you need them.

About the Author

Ivor Online
Ivor Online

ivoronline.com

 

WHY TUTORIALS?

"Things are only as complicated as they are badly explained." 

Proper documentation is essential to avoid struggle and frustration when working with simple things that only seem complicated by not being properly documented and explained. 

 

WHAT KIND OF TUTORIALS?

"Working example is worth thousands of words."

Just like the picture is worth thousands of words the same goes for the working example. Documentation in the form of working examples is proved to be the fastest and the most effective way of transfering knowledge. Sometimes an example is all you need to get the things done. And if there are some accompanying comments that explain what is going on even better. This is the approach I use when creating tutorials. This results in rapid learning which you can apply when you need it in the spirit of Just In Time Support. 

Table of Contents

1. Introduction

1.1      Create SWIFT Application

1.1.1        Using online compiler

2. Predefined data types and their literals

2.1      Predefined data types

2.1.1        Scalar

2.1.1.1         Nil

2.1.1.2         Bool

2.1.1.3         Int

2.1.1.4         UInt

2.1.1.5         Float

2.1.1.6         Double

2.1.1.7         String

2.1.2        Collection

2.1.2.1         Set

2.1.2.2         Dictionary

2.1.2.3         Array

2.2      Literals

2.2.1        Nil

2.2.2        Boolean

2.2.3        Integer

2.2.3.1         Decimal Notation

2.2.3.2         Binary Notation

2.2.3.3         Octal Notation

2.2.3.4         Hexadecimal Notation

2.2.4        Float

2.2.4.1         Basic Notation

2.2.4.2         Scientific Notation

2.2.5        String

2.2.6        Array

3. Constants, Variables and Optionals

3.1      Constants

3.1.1        Declare

3.1.1.1         Name

3.1.1.2         Data type

3.2      Stored Variables

3.2.1        Declare

3.2.1.1         Name

3.2.1.2         Data type

3.3      Computed Variables

3.3.1        Declare

3.3.1.1         Getter

3.3.1.2         Setter

3.4      Optionals

3.4.1        Declare

3.4.1.1         Name

3.4.1.2         Data type

3.4.1.3         Forced unwrapping

3.4.1.4         Optional binding

3.5      Computed Optionals

3.5.1        Declare

3.5.1.1         Getter

3.5.1.2         Setter

4. Basic syntax

4.1      Comments

4.1.1        Single Line

4.1.2        Multi Line

4.2      Operators

4.2.1        Comparison

4.2.2        Arithmetic

4.2.3        Assignment

4.2.4        Bitwise

4.2.5        Logical

4.3      Statements

4.3.1        Conditional

4.3.1.1         Branching

4.3.1.1.1      if

4.3.1.1.2      if case

4.3.1.1.3      else if

4.3.1.1.4      else if case

4.3.1.1.5      else

4.3.1.1.6      switch...case

4.3.1.1.7      ? :

4.3.1.2         Looping

4.3.1.2.1      for

4.3.1.2.2      for…in

4.3.1.2.3      while

4.3.1.2.4      do...while

4.3.2        Jumping

4.3.2.1         break

4.3.2.2         continue

4.3.2.3         return

4.4      Errors

4.4.1        assert

4.4.2        guard

4.4.3        do...catch

4.5      Type aliases

4.5.1        Declare

4.6      Observers

4.6.1        Declare

4.7      Closures

4.7.1        Declare

5. Creating custom data types

5.1      Classes

5.1.1        Declare data type

5.1.2        Designated Initializer

5.1.3        Convenience Initializer

5.1.4        Deinitializer

5.1.5        Inherit Class

5.1.6        Conform to protocol

5.2      Structures

5.2.1        Declare data type

5.2.2        Initializer

5.2.3        Mutating methods

5.2.4        Conform to protocol

5.3      Enumerators

5.3.1        Simple Enumerator

5.3.1.1         Declare Data Type of Values

5.3.1.1.1      Int

5.3.1.1.2      Float

5.3.1.1.3      String

5.3.1.2         Initializer

5.3.1.3         Reference

5.3.2        Complex Enumerator

5.3.2.1         Declare type

5.3.2.2         Reference

5.3.2.3         Initializer

5.3.2.4         Extract data

5.4      Protocols

5.4.1        Declare data type

5.4.1.1         Property

5.4.1.2         Method

5.5      Functions

5.5.1        Declare

5.5.2        Reference

5.5.3        Name

5.5.4        Scope

5.5.4.1         Global

5.5.4.2         Function

5.5.5        Return

5.5.5.1         Number of values

5.5.5.1.1      None

5.5.5.1.2      Single

5.5.5.1.3      Multiple

5.5.5.2         Types

5.5.5.2.1      Scalar

5.5.5.2.2      Tuple

5.5.5.2.3      Function

5.5.6        Parameters

5.5.6.1         Default values

5.5.6.2         Number of parameters

5.5.6.2.1      Zero

5.5.6.2.2      One

5.5.6.2.3      Multiple

5.5.6.2.4      Variable

5.5.6.3         Names

5.5.6.3.1      No public names declared

5.5.6.3.2      Public names declared

5.5.6.3.3      Public names omitted

5.5.6.4         Modifiers

5.5.6.4.1      Variadic

5.5.6.4.2      Constant

5.5.6.4.3      Variable

5.5.6.4.4      In-Out

5.5.6.5         Types

5.5.6.5.1      Scalar

5.5.6.5.2      Tuple

5.5.6.5.3      Function

5.5.6.5.4      Closure

5.6      Tuples

5.6.1        Declare

5.6.2        Reference

6. Advanced topics

6.1      Properties

6.1.1        Declare

6.1.2        Reference

6.1.2.1         Static field from static method

6.1.2.2         Static field from instance method

6.1.2.3         Static field using class name

6.1.2.4         Instance field from instance method

6.1.2.5         Instance field from object

6.1.2.6         Field using self

6.1.2.7         Parent's fields

6.1.3        Scope Modifiers

6.1.3.1         Public

6.1.3.2         Internal

6.1.3.3         Private

6.1.4        Other Modifiers

6.1.4.1         Static

6.2      Methods

6.2.1        Declare

6.2.2        Reference

6.2.2.1         Static method from static method

6.2.2.2         Static method from instance method

6.2.2.3         Static method using class name

6.2.2.4         Instance method from instance method

6.2.2.5         Instance method from object

6.2.2.6         Method using self

6.2.2.7         Parent's methods

6.2.3        Scope Modifiers

6.2.3.1         Public

6.2.3.2         Internal

6.2.3.3         Private

6.2.4        Other Modifiers

6.2.4.1         Static

6.2.4.2         Final

6.2.5        Predefined

6.2.6        Override

6.3      Extensions

6.3.1        Declare

6.3.2        Add

6.3.2.1         Method

6.3.2.2         Computed property

6.3.2.3         Convenience initializer

6.4      Subscripts

6.4.1        Declare

6.5      Generics

6.5.1        Class

6.5.1.1         Declare

6.5.1.2         Extend

6.5.2        Structure

6.5.2.1         Declare

6.5.2.2         Extend

6.5.3        Enumerator

6.5.3.1         Declare

6.5.4        Function

6.5.4.1         Declare

6.5.5        Constraints

6.5.5.1         Conform to existing protocol

6.5.5.2         Conform to custom protocol

6.6      Custom Operators

6.6.1        Prefix

6.6.2        Postfix

6.6.3        Infix

6.7      Patterns

6.7.1        Wildcard

6.7.2        Identifier

6.7.3        Value-Binding

6.7.4        Tuple

6.7.5        Enumeration Case

7. Tools

7.1      Online compiler

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub