Category Archives for Swift

Swift: Reference Equality and Value Equality For Classes ​

There are two ways for testing the equality of class instances: reference equality and value equality. In this post we will discuss both of them.

Continue reading

Sets in Swift

Sets are one of Swift’s collection types. A set stores an amount of unique values, that have no particular order. You can imagine a set to be like a box of billiard balls: They are all unique in terms

Continue reading

Properties in Swift

There are two types of properties in Swift: stored properties and computed properties. Stored properties store values (constant or variable) as part of an instance or type, whereas computed properties

Continue reading

Swift: Comparing Enums With Associated Values

Comparing enums in Swift is very straightforward – as long as they don’t have associated values. In this post we will discuss, what you can do in that case.

Continue reading

Swift: Extensions

Like categories in Objective-C, extensions in Swift give you the opportunity to add functionality to a type. This is not only possible for your own types, but also for types for which you don’t

Continue reading

March 2017: The Current State Of Swift

In February 2016, I published a post that discussed the state of Swift at that date. Time to look what has changed since then.

Continue reading

Sorting Arrays in Swift

Sorting arrays is a very common task. Swift has a built-in feature that is fast and easy to use. In this article you’ll learn all the details.

Continue reading

Retain Cycles, Weak and Unowned in Swift

Memory management, retain cycles and the usage of the keywords weak and unowned are a little bit confusing. On the other hand it’s very important to understand this topic properly because retain

Continue reading

Swift: filter

Swift provides you some handy functions like filter and map for manipulating arrays. In this post we will take a look at filter and how you can combine it with map.

Continue reading

Swift: Use Cases For Guard

The keyword guard has been introduced in Swift 2. It was a little bit inconspicuous at the first sight, but it has a lot of power. In this article we will take a look at three uses cases for guard.

Continue reading

try!

Error handling is a very important topic and I’ve written already a blog post about that topic. You can also check out my talk about that topic on the Swift Summit in San Francisco. In this post

Continue reading

Swift: The Nil Coalescing Operator

The so-called Nil Coalescing Operator is an interesting operator, that you can use for working with optionals.

Continue reading
1 2 3 4