kbcathey Profile Banner
Kevin Cathey Profile
Kevin Cathey

@kbcathey

Followers
1K
Following
570
Statuses
106

SwiftUI Previews @ Apple

Cupertino, CA
Joined July 2011
Don't wanna be here? Send us removal request.
@kbcathey
Kevin Cathey
2 months
The SwiftUI tools team is hiring! We are looking for engineers passionate about the intersection of UI design, UI frameworks, and applying techniques like ML to guide building great user experiences. If this sounds interesting, please apply!
1
21
60
@kbcathey
Kevin Cathey
8 months
@pwnies Could you be more specific? What kinds of issues are you seeing?
0
0
0
@kbcathey
Kevin Cathey
8 months
@azamsharp Unfortunately yes, this is a known issue with previews.
0
0
1
@kbcathey
Kevin Cathey
1 year
The SwiftUI Previews team is looking for an intern for summer 2024! To learn more and how to apply, checkout
0
15
23
@kbcathey
Kevin Cathey
2 years
0
0
0
@kbcathey
Kevin Cathey
2 years
@thecraftybrit That's good to know! We look forward to getting the preview diagnostics, thanks for helping us make previews better!
1
0
0
@kbcathey
Kevin Cathey
2 years
@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
@kbcathey
Kevin Cathey
2 years
This might be worth posting again: The SwiftUI Previews team is hiring! We love sitting at the intersection of tools, languages, frameworks, & the OS. If you love thinking about how we all write software and love to learn, please apply or DM!
2
12
27
@kbcathey
Kevin Cathey
2 years
@jamesdempsey I think I fixed it now :)
0
0
1
@kbcathey
Kevin Cathey
2 years
@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
@kbcathey
Kevin Cathey
3 years
@sayhellobryan Glad to hear! Please keep the bug reports with previews diagnostics headed our way. We read every one of them.
0
0
1
@kbcathey
Kevin Cathey
3 years
@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
@kbcathey
Kevin Cathey
3 years
@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
@kbcathey
Kevin Cathey
3 years
@kyleve @NeoNacho We've worked hard to make our previews diagnostics actionable without needing the project. If you have that I would LOVE to see it, just send me the FB number.
0
0
2
@kbcathey
Kevin Cathey
3 years
Why isn't my `previewLayout` modifier working in Xcode 14? We've made previews live by default. Preview layout modifiers only take effect in the Selection and Variant modes.
2
2
6
@kbcathey
Kevin Cathey
3 years
@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
@kbcathey
Kevin Cathey
3 years
@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