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 […]

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 […]