Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Discuss the WWDC23 Session Build programmatic UI with Xcode Previews

RSS for tag

Build programmatic UI with Xcode Previews

Posts under wwdc2023-10252 tag

1 Post
Sort by:

Post

Replies

Boosts

Views

Activity

Using @Namespace in #Preview Xcode 15 gives an error message
Greetings... I am trying to use @Namespace for my matchedGeometryEffect use case. prior to Xcode 15 beta the following code worked just fine: struct ChapterItem_Previews: PreviewProvider { @Namespace static var namespace static var previews: some View { ChapterItem(namespace: namespace, show: .constant(true)) } } However trying to do the same within the new Xcode 15 beta #Preview Macro #Preview { @Namespace var namespace ChapterItem(namespace: namespace, show: .constant(true)) } produces the following error message: Ambiguous use of 'Preview(_:traits:body:)' May I kindly get assistance on the proper way I can get this to work in Xcode 15 beta? Please be as detail as you can since I'm still new to swiftUI as well Thank You.
3
0
2.2k
Mar ’25