It’s been 18 years since iOS launched and 17 years since the iOS SDK was released—yet the navigation bar is still frustratingly uncustomizable. Sure, you can tweak text attributes, background images, and colors, but anything beyond that? Forget it. Even Apple’s own Invites app highlights how limited it is. Take back buttons, for example. UIKit technically allows you to set an image or a custom title, but try adding a fully custom view (say, one that matches your company’s design) usin...| Marcel Voss
I’ve always been a console gamer, avoiding gaming PCs because I didn’t want to deal with tweaking graphical settings or, more importantly, Windows. However, when I got into sim racing during the COVID lockdowns, I had no choice but to build a proper gaming PC. The drivers for my sim racing hardware were only supported on PC, and the selection of racing games was significantly better. Unsurprisingly, returning to Windows was as frustrating as I remembered. Almost immediately, I was reminde...| Home on Marcel Voss
I don’t know about you, but it happens quite often to me that I want to use a UIImage instance and assign it to another piece of UI that requires it to be non-optional. Unfortunately, most UIImage initializers produce optionals. While this does make sense, as the asset might be missing or there has been a typo in its name, it can be quite annoying when we’re sure the asset exists and can be used. But don’t worry, there’s an easy trick to work around behavior.| Home on Marcel Voss
Swift 6 has a bunch of changes that will change the way we will use Swift in the future, with some of them being breaking changes. Wouldn’t it be handy if we could try out some of these upcoming features ahead of their release, so we can evaluate the impact they will have on our codebase and can start amending our code already? Good news: there is! With SE-0362 having been implemented in Swift 5.8, we can now opt-in into certain Swift features ahead of their release, given they’ve been al...| Home on Marcel Voss
After almost three years without any post on this blog, I finally managed to post something and not only did I post a new article, I also transitioned this site from being built using John Sundell’s Swift-based Publish static site generator to the Go-based Hugo generator. 🎉 While I like Hugo and its maturity, I’m still torn as I enjoyed the way Publish used Swift for building the theme, defining the generation pipeline, as well as its integration of plugins for extending it. However, i...| Home on Marcel Voss
When I recently reviewed a colleagues’ Android code, I stumbled upon a function call named with that allows for omitting a variable’s name within its scope (for example for accessing multiple members). As pointed out by that colleague, Kotlin actually has a bunch of nifty APIs that are being described as Scope Functions . The Kotlin standard library contains several functions whose sole purpose is to execute a block of code within the context of an object. […] In this scope, you can acc...| Home on Marcel Voss
What do all higher order functions in Swift have in common? They abstract boilerplate code away by hiding it in their highly generic implementations, focussing on what to achieve rather than on how to get there because that’s what we usually care about. By abstracting boilerplate away, we can eliminate plenty of failures we could potentially introduce by writing the same thing over and over again, not realizing a small mistake.| Home on Marcel Voss
A “Hello, World!” program generally is a computer program that outputs or displays the message “Hello, World!”. Because it is very simple in most programming languages, it is often used to illustrate the basic syntax of a programming language and is often the first program that those learning to code write. - Wikipedia As the title of this post suggests, this blog will be (mainly) about software development. In the future, I would also like to write about interesting topics I come acr...| Marcel Voss
From: Marcel Voss' Blog| iOS Feeds
Our design system1 provides colors for three different contexts: background, foreground, and borders. Each color can exist in four different states: normal, hovered, disabled, and pressed. Historically, we modeled this using a UIColor subclass that exposed properties for different states. When the instance was used as is, it implicitly represented the normal variant. While this approach was convenient—since developers never had to manually reference the normal state—it had trade-offs. As ...| Marcel Voss