CoreGraphics Geometry Primitives and Functions
Unless you were a Math Geek or an Ancient Greek, Geometry probably wasn’t your favorite subject in school. More likely, you were that kid in class who dutifully programmed all of those necessary...
View ArticleOptional, throws, Result, and async/await
Back in the early days of Swift 1, we didn’t have much in the way of error handling. But we did have Optional, and it felt awesome! By making null checks explicit and enforced, bombing out of a...
View ArticleXcode Plugins
As of 2016, Xcode Plugins are no longer supported. Please see our follow-up article for more information about their successors: Xcode Source Extensions.Apple is nothing if not consistent. From...
View ArticleImage Resizing Techniques
Since time immemorial, iOS developers have been perplexed by a singular question:“How do you resize an image?”It’s a question of beguiling clarity, spurred on by a mutual mistrust of developer and...
View ArticleXcode Build Configuration Files
Software development best practices prescribe strict separation of configuration from code. Yet developers on Apple platforms often struggle to square these guidelines with Xcode’s project-heavy...
View ArticleSwift Code Formatters
I just left a hipster coffee shop. It was packed with iOS devs, whispering amongst each other about how they can’t wait for Apple to release an official style guide and formatter for Swift.Lately, the...
View ArticleWWDC 2019
Apple’s press release announcing the company’s annual developer conference featured an illustration of a robot head (🤖) bursting with code symbols, emoji, and Apple iconography.All last week, attendees...
View ArticleSwift Property Wrappers
Years ago, we remarked that the “at sign” (@) — along with square brackets and ridiculously-long method names — was as characteristic of Objective-C as parentheses are to Lisp or punctuation is to...
View ArticleUIStackView
When I was a student in Japan, I worked part-time at a restaurant — アルバイト(arubaito) as the locals call it — where I was tasked with putting away dishes during downtime. Every plate had to be stacked...
View ArticleCAEmitterLayer
Etymologically, confetti comes from the Italian word for the sugar-coated almond sweet thrown at celebrations, which, in turn, get their name from the Latin conficio: con- (“with, together”) + facio...
View ArticleFormatter
Conversion is a tireless errand in software development. Most programs boil down to some variation of transforming data into something more useful.In the case of user-facing software, making data...
View ArticleNetwork Link Conditioner
Product design is about empathy. Knowing what a user wants, what they like, what they dislike, what causes them frustration, and learning to understand and embody those motivations — this is what it...
View ArticlemacOS Accessibility Keyboard
For a while now, the distinction between “desktop” and “mobile” has become increasingly tenuous. As the computers in our pockets grow ever more capable, they more closely resemble the computers...
View ArticleIdentifiable
What constitutes the identity of an object?Philosophers have contemplated such matters throughout the ages. Whether it’s to do with reconstructed seafaring vessels from antiquity or spacefaring vessels...
View ArticleDark Mode on iOS 13
Today is Labor Day in the United States (and Labour Day in Canada), a day to celebrate the achievement of the workers who organized to bring about fair and safe conditions for employees — protections...
View ArticleApple Push Notification Device Tokens
In law, the latin phrase stare decisis (“to stand by things decided”) is often used to refer to the doctrine of precedent — the idea that, when deciding a case, a court should look to previous...
View ArticleiOS 13
Apple announced a lot at WWDC this year. During the conference and the days that followed, a lot of us walked around in a daze, attempting to recover from have our minds “hashtag-mindblown’d” (#🤯). But...
View ArticleSwiftUI Previews on macOS Catalina and Xcode 11
Working on a large iOS codebase often involves a lot of waiting: Waiting for Xcode to index your files, waiting for Swift and Objective-C code to compile, waiting for the Simulator to boot and your app...
View ArticleMetricKit
As an undergraduate student, I had a radio show called “Goodbye, Blue Monday” (I was really into Vonnegut at the time). It was nothing glamorous — just a weekly, 2-hour slot at the end of the night...
View ArticleDevice Identifiers and Fingerprinting on iOS
For every era, there’s a monster that embodies the anxieties of the age.At the dawn of the Holocene, our ancestors traced the contours of shadows cast by the campfire as they kept watch over the...
View Article