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 Tutorial Topics
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.
- Swift Basic Example
- Swift Data Types
- Swift Variables
- Swift Comments
- Swift Optionals
- Swift Tuples
- Swift Keywords
- Swift Constants
- Swift Literals
- Swift Operators
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 if
- Swift if else
- Swift else if
- Swift nested if
- Swift switch
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 for loop
- Swift while loop
- Swift repeat while loop
- Swift continue
- Swift break
- Swift fallthrough
- Swift forEach
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 String Concatenation
- Swift Sub-String
- Swift String Length
- Swift Strings Equal
- Swift – Convert String to Integer
- Swift String reverse
Swift Arrays 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.
- Swift Array
- Swift Array Initialization
- Swift Integer Array
- Append an integer to the Swift Array
- Swift String Array
- Append String to Swift Array
- Print Swift Array
- Check if an Array is Empty
- Get Swift Array Size
- Append or Concatenate two Swift Arrays
- Remove an element from Swift Array
Swift Sets Tutorials
Sets are collection of items that are stored not necessarily in sequential manner.
- Swift Set
- Check if an element is present in a Set
- Add or insert an element to Swift Set
- Get Set Size
- Print elements of Set
Swift Dictionary Tutorials
- Swift Dictionary
- Create Swift Dictionary
- Create Dictionary using Arrays for keys and values
- Convert Dictionary into Arrays of keys and values
- Get Dictionary Size
- Iterate Swift Dictionary
- Append Element to Dictionary
- Get Value using Key in Dictionary
- Check if a specific key is present in the Dictionary
- Check if the Dictionary is empty
- Print all keys in a Dictionary
- 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