NSTimer – Repeat

The NSTimer class is a workhorse of iOS applications, but it is also complex, fraught with hidden gotchas and cumbersome to use. For example, when a timer expires, its callback mechanism consists of performing a selector on a target object, which doesn’t work with a pure Swift class (or struct, etc.) and forces us to… Continue reading NSTimer – Repeat

Published
Categorized as Foundation

How to blog regularly?

Blogging has great benefits for developers. But in order to build a successful blog, you have to blog regularly.

Published
Categorized as Blogging

Swift: Avoiding C-Style For-Loops

C-style for-loops will be removed in Swift 3. This may seem a little bit strange at first sight. But Swift has some features that allow better loop structures. C-style for-loops Let’s start by looking at the following C-style for-loop: let programmingLanguages = [“Swift”,”Objective-C”,”Java”] for var i = 0; i < programmingLanguages.count; i++ { print(“index: \(i), value:… Continue reading Swift: Avoiding C-Style For-Loops

Published
Categorized as Swift

Should You Still Learn Objective-C?

Since the introduction of Swift there are two important languages in the Apple ecosystem. Swift has become quiet popular in the meantime, so that it’s a good question whether you should still learn Objective-C or not.