SwiftUI Weekly - Issue #172
The curated collection of links about SwiftUI. Delivered every Monday.
Sponsor
RevenueCat
RevenueCat makes it easy to add subscriptions to your app, manage customers, and grow revenue with remotely configured paywalls and experiments. See why over 30,000 apps use RevenueCat's SDK to power their app business.
Reading
AnyView’s impact on SwiftUI performance
AnyView
is a type-erased view that can be handy in SwiftUI containers consisting of heterogeneous views. In these cases, you don’t need to specify the concrete type of views in the view hierarchy. With this approach, you can avoid using generics, thus simplifying your code.
SwiftUI Observation Framework: State Containers
iOS 17 completely changed how we observe changes from SwiftUI views. SwiftUI is no longer coupled with the Combine
framework when it comes to observing external state updates (we don’t need @Published
properties any longer).
Using Identifiable in SwiftUI
In this blog post, I will explain Identifiable
and ObjectIdentifier
based on the example of using SwiftUI's List
.
SwiftUI Binding Tips
When working with bindings in SwiftUI, it can be useful to modify bindings. For example, in a Slack I’m part of, someone had a binding to a Boolean and wanted to negate it.
Solving SwiftUI Performance Issues with the Instruments App
Ever wanted to know how to find and fix performance issues in your app or just how to make your app faster? In this article, we go over how I made an app 19 times faster by replacing a single component, along with how to find and fix other performance-related issues.