Cool-looking German restaurant for next time I’m in New York City.
Author: patmcg
Simple iOS Performance Tips
A former engineer gives us “a checklist of performance tips that would hopefully give you the biggest bang for your buck.”
I have noticed that there was a pattern of low-hanging fruits, where you could make 80% of the performance gains in 20% of the time.
👉 iOS Performance tips you probably didn’t know (from an ex-Apple engineer)
Cheat sheet:
UILabelcosts more than than you think- Always start with serial queues, and only use concurrent queues as a last resort
- Some system components will only free up memory when they receive a memory warning
- Avoid using
dispatch_semaphore_tto wait for asynchronous work - Don’t use
UIViewtags

Via iOS Dev Weekly.
Swift’s Closure Capturing Mechanics
This post runs through the mysteries and complexities of Swift closure variable capturing. It’s a tricky topic: implicit capturing, capture lists, weak references, capturing values, unowned references… 🤯 all well-covered here.
👉 Swift’s closure capturing mechanics

Via iOS Dev Weekly.

State Machines in SwiftUI
An app view that changes its state in complicated ways is difficult to do right. We developers have even been trying to avoid state when possible. But if you really just have to deal with a complex state-driven app view, then embrace it with a state machine.
👉 Building a state-driven app in SwiftUI using state machines
Honestly, this is my favorite programming technique, where the really interesting stuff happens. 👍

Via iOS Dev Weekly.
