Type Safely

Type Safely

Share this post

Type Safely
Type Safely
See What Property Change Caused SwiftUI To Refresh a View
Copy link
Facebook
Email
Notes
More

See What Property Change Caused SwiftUI To Refresh a View

Daily Coding Tip 217

Type Safely's avatar
Type Safely
Nov 13, 2022
∙ Paid

Share this post

Type Safely
Type Safely
See What Property Change Caused SwiftUI To Refresh a View
Copy link
Facebook
Email
Notes
More
Share
coconut tree on beach shore during daytime
Photo by Nicolas Hoizey on Unsplash

It is possible to get SwiftUI to print changes that occur.

This only counts changes that cause the view’s body to be refreshed, so I’m including three controls that can be changed by the user. The scope of the call that runs Self._printChanges() determines where the changes will be detected, which is inside a VStack in…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More