Hi Anna_Ciobu,
Double check your Preview struct method. You can always use the default if the ContentView is too complicated. Make sure the method is outside of your code scope; at the very bottom of your code and reads (generally):
struct ContentView: some View {
var body: some View {
// body of your code that does something and is defined in the body{}...
}
}
#Preview {
ContentView()
}
Also make sure that your device simulator is set (din't press the build/play button :
Happy frustration free coding :)
--CC
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: