Previewing Private SwiftUI View Structures
Daily Coding Tip 089

The ListView in yesterday’s Daily Coding Tip presents some challenges when it comes to preview in the SwiftUI. As you can see at the bottom of this code, it is impossible to refer to ListView.ListRow.previews due to it being a private struct. One solution to this is for the private view to conform to the PreviewProvider …
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.

