![Kevin Cathey Profile](https://pbs.twimg.com/profile_images/1243548809767948288/tVkqQdpY_x96.jpg)
Kevin Cathey
@kbcathey
Followers
1K
Following
570
Statuses
106
SwiftUI Previews @ Apple
Cupertino, CA
Joined July 2011
@thecraftybrit That's good to know! We look forward to getting the preview diagnostics, thanks for helping us make previews better!
1
0
0
@bradleybernard This happens if your view, e.g. `SettingsView` has an implicit stack. i.e. the `body` had three views without an enclosing container like VStack, Group, etc. Workaround: wrap your preview in a Group in `previews` This is fixed with the new Preview macro API in Xcode 15.
1
0
1
@MuseumShuffle Thanks for posting and sending in the feedback. Can you try closing the "Remote.swift" file and just having the single widget file open?
0
0
0
@sayhellobryan Glad to hear! Please keep the bug reports with previews diagnostics headed our way. We read every one of them.
0
0
1
@sayhellobryan Another abstraction that works well is to put all of your UI code in a leaf module. This forces you to minimize what you can pass into and be intentional about design. And then it means you can refactor your app without having to immediately update your previews.
1
0
1
@kyleve @NachoSoto Ouch, yeah, there are definitely known issues related to nested types, especially combined with generics. Sometimes this can be worked around (yes, I know it's just a workaround) with well placed `typealias`'s that help the inner types know how to find sibling nested types
0
0
1
@ethanhuang13 We realize that won't work for all cases, so please file a feedback request with your use cases; we'd love to understand them. And yes, we do read ALL feedback sent for previews :)
0
0
1
@ethanhuang13 The current recommendation is to put views with varying data configurations into a single view like a `VStack` or `List`. For example in my projects I'm finding it more accurate to put all of my cell combos into a `List` because then I see them with the correct metrics
0
0
2