The need to work with collections of values is pretty common in Swift. To help with this, Swift provides a number of collection types, flexible containers that let you store a number of different values together within a single entity. One of the most common of these is the Array, and in this article, we’re going to go over the basics.
The iOS SDK is an ever-changing beast and with new APIs becoming available and others being obsoleted with each release of iOS. Up until now, determining which APIs are available on which platform has been tricking, but with the introduction of Swift 2.0’s availability APIs, things have just got better.
In Objective-C, if you want to return multiple values from a function or method you have to either create a class or store values in a dictionary. In Swift though, we have an alternative: Tuples.
guard statement brings the power of the nightclub doorman to the Swift language promising cleaner, more explicit and a more elegant code. In this article I want to find out whether it lives up to these promises.