//
// ContentView.swift
// HardApp
//
// Created by Besleaga Alexandru Marian on 14.06.2024.
//
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
// A SwiftUI preview.
#Preview { Use of unknown directive '#Preview'
// The view to preview.
}
I'm trying to learn Xcode and got stuck on these error that I receive when trying to apply the macro #Preview, how can declare the directive so I can use it in my own code for the preview it offers ?
Kind Regards