SwiftUI Weekly - Issue #168
The curated collection of links about SwiftUI. Delivered every Monday.
Reading
Visual effects in SwiftUI
During WWDC 23, SwiftUI introduced a new view modifier called visualEffect. This modifier allows us to attach a set of animatable visual effects by accessing layout information of the particular view. This week, we will learn how to use the new visualEffect view modifier in SwiftUI.
Custom Traits and SwiftUI
Starting with iOS 17 you can add your own custom traits to the UIKit trait environment and have them interoperate with the SwiftUI environment.
Mastering ViewThatFits
In iOS 16, SwiftUI introduces a new adaptive layout container called ViewThatFits. As the name suggests, its purpose is to find the most appropriate view among a given set of views and use it. For most people, this is a simple and easy-to-use container.
The alternative to SwiftUI's Spacer
Early on, SwiftUI introduced Spacer
. But did you know that you can replace it with something else in most use cases?
Animating numeric text in SwiftUI with the Content Transition modifier
Learn how to use the content transition modifier to animate numeric text in SwiftUI.
Library
Introducing Inferno: Metal shaders for SwiftUI
SwiftUI for iOS 17 and macOS Sonoma come with a fantastic new superpower: the ability to transform any SwiftUI view with Metal shaders, all hardware accelerated so complex effects run at lightning fast speeds even on old devices.