3 min read

Issue #54

Hi there, welcome to the 54th issue of iOS Code Review!  Let's learn something new ☀️
It's confirmed - I'm going to iOSDevUK and NSSpain 🎉  More details at the end of the email :)

Cleaner grid initialization

Here's Daniel with handy extensions for a simpler way of defining  LazyVGrid and LazyHGrid 's columns:

LazyVGrid(columns: .fixed(100)) { ... }
LazyVGrid(columns: [.fixed(100), .fixed(150)]) { ... }
LazyVGrid(columns: .adaptive(minimum: 100, maximum: 150)) { ... }
Cleaner grid initialization in SwiftUI
SwiftUI’s LazyVGrid and LazyHGrid are great for creating powerful and flexible grids, but I always struggle with how to define columns when creating them. I’ve therefore created some extensions to make this easier. Let’s take a look.

Analogue clock on macOS in SwiftUI

Apparently, DatePicker on macOS can be fun, where the user can move clock hands to select a time 🙈

Premature Optimization: Universally Misunderstood

The famous quote actually reads:

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.
– Sir Tony Hoare

Indeed, once an app is shipped to users, it can be too late to fundamentally change the app architecture, database structure, or API design. Those large aspects should be thought through early, and small optimizations can be done at a scaling stage.

milen.me — Premature Optimization: Universally Misunderstood
“Premature Optimization” You might have come across the famous software optimisation quote popularised by Donald Knuth:Premature optimization is the root of all evil.– Sir Tony HoareIt has been commonly interpreted as “don’t think about performance in the beginning, you can fix any performance pr…

Co-authoring Git commits

Git supports having multiple authors on a commit - so when you're pair-programming with a colleague, they can receive credit for it too.
We simply need to add the credit as extra text anywhere in the commit message - Co-authored-by: <name> <email> :

By Cassidy Williams

Tool to find unused code

TIL that there's a tool to find unused code, I always wished there was one. It's called Periphery. I learned about it via Manu, who wrote a nice article on how to set it up for your project:

Use Periphery to find unused code
From time to time, it might be a good idea to spend a couple of hours checking if there is some code in the codebase that is not being used anymore. Luckily for us, there is a tool out there that can make the job easier. Periphery: A tool to identify unused code in Swift projects. Using Periphery on…


I will be at iOSDevUK on the main conference days -  5-7 September, and on NSSpain 14-16 September. If you're there - come say hi!
I'll have stickers to give away 😋  Do you also want a t-shirt with the newsletters logo? Send me your size and I'll pre-make one for you.

Join the Mobile DevOps Summit 2023 on Oct 4-5
A two-day, free event with 40+ workshops and sessions brought to you by 50+ industry-leading speakers from eBay, Reddit, AWS and more. Learn from real-world examples of successful Mobile DevOps implementations. Check out our speaker list

Alright, that's it for today! Let's spread the good code vibes ✨🧘🌈☀️