Swift Tutorial

Welcome to Swift Tutorial. In this series of Swift Tutorials, you will learn all the basics of Swift programming language with detailed examples.

Introduction to Swift

  • Swift is a new programming language developed by Apple Inc.
  • Swift is used to develop applications for iOS and OS X.

Pre-requisites for Swift Tutorial

This Swift Tutorial is targeted for beginners. So, every topic shall be explained in detail. You will find it better if you know basic programming concepts or any other programming language.

Swift Tutorials

In this Swift Tutorial series, we shall go through the following topics.

Swift Basic Tutorials

These basic Swift Tutorials gets you introduced with the datatypes available in Swift, how to declare variables, constants, etc, what are the keywords available in swift, and operators like logical, arithmetic, boolean, etc.

Some how-tos..

Swift Datatypes

The following Swift Tutorials deal with each of the datatype in Swift separately with examples.

Swift Operators

The following Swift Tutorials deal with each of the operator in Swift separately with examples.

Swift Decision Making Tutorials

The decision making statements are those that execute a block of statements based on the evaluation of an expression (or condition).

Swift Loops Tutorials

Looping statements help to execute a set of statements repeatedly based on the evaluation of a condition. Also, there are loop control statements like break and continue to break a loop abruptly and continue with the other statements or skip the execution of statements for an iteration.

Swift Integer Tutorials

Swift Strings Tutorials

Strings are the basic data types that one uses for most of the real-time applications. Following series of Swift Tutorials help you on how to work with Strings in Swift, how to find the length of a string, how to check if two strings are equal, how to convert a string to integer or vice-versa, and other useful string operations.

Swift Array Tutorials

Arrays store like kind of elements in a sequential manner and can be accessed using a single variable name and of-course the index. Following Swift Tutorials deal with how to work with Arrays in Swift, starting from initialization and proceeding with different operations like printing, checking, appending, removing elements from the array.

Creating Swift Arrays

  1. Swift Array
  2. Create Empty Array in Swift
  3. Create Empty String Array in Swift
  4. Create an Array of Specific Size in Swift
  5. Create an Array with Default Value for Each Item in Swift
  6. Create an Array with Initial Values in Swift
  7. Swift Array Initialisation
  8. Swift Integer Array
  9. Swift String Array
  10. Print Swift Array
  11. Check if an Array is Empty
  12. Get Swift Array Size

Modify Swift Arrays

  1. Swift Array – Append an Element
  2. Swift Array – Append Another Array
  3. Append an integer to the Swift Array
  4. Append String to Swift Array
  5. Concatenate two Swift Arrays using Addition (+) Operator
  6. Remove an element from Swift Array

Accessing Swift Arrays

  1. Swift Array – Access Elements using Index
  2. Swift Array – Loop over Elements using For Loop
  3. Swift Array – Loop over Elements using While Loop
  4. Swift Array – Loop over Elements using forEach Loop

Swift Set Tutorials

Sets are collection of items that are stored not necessarily in sequential manner.

  1. Swift Set
  2. Check if an element is present in a Set
  3. Add or insert an element to Swift Set
  4. Get Set Size
  5. Print elements of Set

Swift Dictionary Tutorials

  1. Swift Dictionary
  2. Create Swift Dictionary
  3. Create Dictionary using Arrays for keys and values
  4. Convert Dictionary into Arrays of keys and values
  5. Get Dictionary Size
  6. Iterate Swift Dictionary
  7. Append Element to Dictionary
  8. Get Value using Key in Dictionary
  9. Check if a specific key is present in the Dictionary
  10. Check if the Dictionary is empty
  11. Print all keys in a Dictionary
  12. Merge Dictionaries

Other Useful Swift Tutorials

  • Swift Characters
  • Swift Functions
  • Swift Closures
  • Swift Enum
  • Swift Structures
  • Swift Classes
  • Swift Properties
  • Swift Methods
  • Swift Subscript
  • Swift Inheritance
  • Swift Initialization
  • Swift Deinitialization
  • Swift ARC
  • Swift Optional Chaining
  • Swift Type Casting
  • Swift Extensions
  • Swift Protocols
  • Swift Generics
  • Swift Access Control

Swift Programs