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)) { ... }
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.
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>
:
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:
✌️
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.
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 ✨🧘🌈☀️
Member discussion