[Photo by Sergey Svechnikov on Unsplash]

Since UICollectionView arrived back in iOS 6.0 it’s become the workhorse of UI development. It can be seen everywhere rendering the dynamic content of the interweb’s feeds, lists and stories. Although capable the API suffers from that particular clunkiness that only an Objective-C Cocoa API can gi...

A few code-bases I’ve come across have used instance properties to hold constants, as follows.

class LoginViewController: UIViewController {
    private let headerSpace: CGFloat = 24

This is convenient since the value can be referenced within the class without any additional prefix or scoping....

A gem from Advanced Swift (credited to David Smith on Twitter) is the appreciation of Swift’s three representations of nothing. Although the language's syntactic shortcuts give us succinct code they sometimes mask the details and in doing so blunt our understanding of how things work.