Snippet of the Week: `NSLocalizedString(_:)`

It’s a good habit to start localizing all your user-facing strings from the get-go, even if you’re just tinkering around on a side project. But, while this is a good habit, it riddles your code with strings like these;

Snippet of the Week: `grouped(by:)`

Last holiday, I had the opportunity to start on a new side-project. One of the techniques I touched on, was grouping an array of model objects into sections. Instead of writing my umpteenth for-loop for this, I opted to create a generic function for it.

Thinking up Singletons

While exploring a rescue project, I came across singletons… tons and tons of singletons. There was even a Singletons.swift that just instantiated the lot of them at runtime. Because reasons…

Playing With Gold – Units and Operators in Swift

While playing around with the idea of creating a treasure generator for my tabletop gamer, I ran across Soroush Khanlou’s post on Units which seemed fun to try out.

Core Animation - Press and Hold

Recently I was trying to create a Press and hold animation that was controlled by the user tapping, holding and releasing a button.