SwiftUI Weekly - Issue #209
The curated collection of links about SwiftUI. Delivered every Monday.
Yielding and debouncing in Swift Concurrency
I decided to continue the topic of Swift Concurrency to cover some not-obvious things. This week we will talk about task yielding and debouncing. Swift concurrency language features provide us with two simple but very powerful functions: yield and sleep. We will try to learn how and when to use them.
Designing a custom lazy list in SwiftUI with better performance
Mac apps often need to handle large datasets efficiently, but SwiftUI’s standard List
can struggle with performance on macOS as the number of items grows. Scrolling may become sluggish, and memory usage can increase significantly.
SwiftUI Phase Animation "Bug"
I noticed that phase animators weren’t behaving as expected, and I initially assumed I’d found a bug in SwiftUI. It took me way too long to realize the problem here, that’s why I am writing this up. Spoiler alert: there is no bug .
Symmetrical and asymmetrical transitions in SwiftUI with the Scroll Transition modifier
Learn how to implement animated scroll transitions when the view enters and exits the visible area in a SwiftUI application.
Tapping on Stack Views
A quick tip on using the contentShape view modifier to solve a SwiftUI gesture problem that often catches me out.