WWDC 2018 Viewing Guide

It might have been a year with a focus on stability and performance but there are still lots of new videos to catch up on. Here are the sessions I found most interesting this year.

Read On →

Swift Lazy Property Initialization

What is a lazy stored property in Swift? How and when should you use it? A quick guide to get you started and some key points to remember.

Read On →

Class Only Protocols In Swift 4

The delegation pattern is common in many of Apple’s Cocoa API’s. When using it with Swift you create a class-only protocol that the delegate adopts. What I had not noticed was a subtle change in the way you declare a class-only protocol in Swift 4.

Read On →

Stack Views And Multi-Line Labels

Stack views can save you a lot of time when creating constraints. Unfortunately they are not without problems especially when using multi-line labels. Here is one situation where I think you should skip stack views and create your own constraints.

Read On →

How To Get Equatable And Hashable For Free

Swift 4.1 is available with Xcode 9.3 and brings a nice gift. The compiler can now automatically generate the code to make your types Equatable or Hashable. This only applies to structs and enums (not classes) and there are conditions but this can still save you from a lot of boring boilerplate code.

Read On →
Archives Categories