1.1 Create SWIFT Application
1.1.1 Using online compiler
2. Predefined data types and their literals2.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 Optionals3.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 syntax4.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 types5.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 topics6.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. Tools7.1 Online compiler