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.
2
0
1.9k
Jun ’23