WIP: Use Swift Arrays like Lua Tables

This is work in progress and there are somethings that Swift cannot do where as Lua excels with them. Since everything in a Lua table is a reference or a pointer, you can recursively add table to refer to subtables. You could also store functions in the tables and invoke them based on the key. […]

Tip: Creating an Int from a String in Swift

Talking to a couple of developers over various mediums about Swift has had mixed results. However one thing that came up again and again was that it is a little confusing. While confusing in the literal sense would not be the correct word. So let me elaborate the issue first.

Creating a class from a string in Swift

One thing that Swift does not do very well is dynamism. That is because of the fact that it is a type safe language. So if you were to create a class from a classname i.e. a String, you would get different types of classes depending on the class name. So having a single variable […]

Tuples – holding multiple values in a variable

We saw that we can declare variables or constants to hold values that we could use in our code instead of hard-coding them. We could also return values from functions however in most languages you can only return a single value. Mainly this return value would be more like a Boolean value that indicated if […]

Xcode 6 Essentials

The Xcode Swift Book Giveaway – Xcode 6 Essentials

The new book, Xcode 6 Essentials authored by our very own Jayant Varma has been published by Packt Publishing. To celebrate the same, the publishers have been kind and offered 3 e-books up for offer to you, the readers. If you would like a chance at getting a copy, please leave a comment below. 3 […]

Swift Variables

Basic Explanation Variables are a nothing but tags to something that can hold a value. Say you have a few buckets and you start filling them with fruit. You can visually see the buckets and the fruit in them so you know which one is which. You can label each of the buckets with the […]


Welcome to the Learn Swift Blog. There are some amazing websites and developers that have wonderful articles on Swift. Then why do we have another Swift related website? There are two basic reasons for this site. This site would have code samples and talk about code in addition to that, which is in the books […]