Posts

Post not yet marked as solved
1 Replies
1k Views
Xcode SwiftUI previews were a godsend, increasing my productivity by 1000x with use cases like this: Preview a UIViewController (via UIViewControllerRepresentable) Update view controller code and see changes to previews in real time Update theme files (colors, styles) and see changes to previews in real time This all used to work like a charm as long as the updated code was inside functions or computed properties. But starting with Xcode 13.2, it no longer works: Updating any file outside of PreviewProvider struct just reloads the canvas, but does not account for changes in these files (e.g. if I change color in a theme file, the old color will be shown in preview until I pause the preview, recompile and reload preview) Using "Refresh Canvas" does not solve the issue (it just reloads the canvas with stale data) Any way to fix this?
Posted
by alexfit.
Last updated
.