Swift
Learn more and get better in Swift using this list of Swift blog posts, tutorials, tips, and tricks.
Swift 5.0: How to migrate your project and frameworks
Swift 5.0 has been released in March 2019 and is the first ABI stable Swift release. Although a lot of resources cover the new things in Swift 5.0, they do not often offer you information on what you need to do to update your project to Swift 5.0. In this ...
Blog about Swift: Tips and ideas to start your own
How to start your own Swift blog? It's a question I get asked more and more. I've given some tips already in my interview with hackingwithswift.com, but it's not as good as writing a dedicated post to help you start up your own blog. May 2nd, 2015 I wrote my ...
Required keyword usage in Swift classes and structs
The required keyword in Swift can be used in front of initializers in Swift. Its usage is simple and it's a small use-case, but the usage of the keyword can easily be understood in the wrong way. Required initializers Some think that the required keyword makes only that initializer available ...
Alamofire vs URLSession: a comparison for networking in Swift
Alamofire and URLSession both help you to make network requests in Swift. The URLSession API is part of the foundation framework, whereas Alamofire needs to be added as an external dependency. Many developers doubt whether it's needed to include an extra dependency on something basic like networking in Swift. In ...
How to use for loop, for each, while, and repeat in Swift (in-depth)
For loop, for each, and repeat are examples of control flow statements in Swift. Although most of them look similar, there are differences. Let's go over them one by one and see when you should use which. For loop usage in Swift The for loop might be the most well-known ...
QR Code generation with a custom logo and color using Swift
A QR Code is used a lot to share content or to add a new user in apps like Twitter and Snapchat. Since iOS 11 it's possible for users to scan a QR code with the built-in camera app. This makes it even nicer to integrate a QR code in ...
SwiftLee 2018 in review: Top Swift Development blog posts
With 2019 coming closer it's time to review SwiftLee in 2018 and list the top swift development blog posts of this year. The best thing about this all is that I can say that I've reached thousands of fellow Swift developers and possibly inspired or taught them with something they ...
Implementing Siri support using NSUserActivity, intents and shortcuts
Siri support can be added using an Intent and an IntentUI extension. This adds quite some overhead and is not always the easiest way in a big project, as you need shared logic between the main app and the extension. A much easier way to implement Siri support is by ...
Measure the performance of code in Swift
It's important in any type of programming language to know how to measure the performance of code as there are many different ways to write solutions and not every solution is as performant as the other. If a piece of code turns out to be slow in, for example, the ...
Performance, functional programming and collections in Swift
Functional programming is often done in Swift and so easy that it could easily hit performance. Iterating over large collections and performing actions like filter or map is common and should be used wisely. Performance is often decreasing when these methods are combined, like a filter followed by first. A ...
SwiftLint valuable opt-in rules to improve your code
SwiftLint is a tool by Realm to enforce Swift style and conventions. It's proven to be adopted by a lot of developer with over 10.000 stars on Github. 149 Rules are available for you to use from which a lot are enabled by default. In this post, we're going over ...
Updating to Swift 4.2
Swift 4.2 is a major release and shipped with Xcode 10. It comes with a lot of code improvements for which the best way to start is to watch the WWDC 2018: What’s New in Swift session. Some of the improvements are easy to implement in your existing code. Replace ...