iOS Newsletter
Hi folks,
With WWDC coming up, we’re all curious about what’s next for Swift and SwiftUI. We’re hoping for better performance, more flexible layout tools, and smoother integration across Apple platforms. In the meantime, it’s a great moment to polish our skills, revisit best practices, and keep an eye out for what Apple might have in store.
This week’s articles cover practical Swift and SwiftUI techniques: using defer in async/throwing contexts, profiling with Instruments, and introducing Scoping for cleaner tests. Topics also include SwiftUI styling (foregroundStyle, tint, foregroundColor), adding widgets, tracking view visibility, using composable styles, and applying the Coordinator pattern.
Happy coding!
Swift
Using defer within async and throwing contexts
John Sundell explores how the defer
keyword behaves in asynchronous and throwing contexts, with clear examples of when it executes and when it doesn’t.
Testing
Introducing Swift Testing: Scoping
Majid Jabrayilov dives into the scoping feature of the Swift Testing framework, showing how to organize and filter tests effectively for better test management.
SwiftUI
ForegroundColor, Style and Tint in SwiftUI
Nil Coalescing breaks down the differences between foregroundColor, style, and tint modifiers in SwiftUI, helping you choose the right approach for consistent UI styling.
Adding a Widget to a SwiftUI App
Create with Swift provides a step-by-step guide to adding widgets to your SwiftUI app, covering configuration, timeline providers, and entry types.
Measuring View Visibility Percentage in SwiftUI Using PreferenceKeys
HolySwift demonstrates how to track the visibility percentage of SwiftUI views using preference keys, useful for impression tracking and animations.
Composable Styles in SwiftUI
Moving Parts explores creating composable, reusable styling components in SwiftUI that can be combined and applied throughout your app for consistent design.
Architecture
Coordinator Pattern in SwiftUI
QuickBird Studios explains how to implement the coordinator pattern in SwiftUI applications for better navigation flow management and separation of concerns.
Tools
Using Instruments to Profile a SwiftUI App
Donny Wals walks through profiling SwiftUI apps with Instruments to identify performance bottlenecks and optimize your code for better user experience.