An error appears and I don't know how to solve it : Closure containing a declaration cannot be used with result builder 'ViewBuilder'.
import SwiftUI
Struct ContentView: View {
var body: some View {
// some code...
struct ContentView_Previews: PreviewProvider { // <- error Closure containing a declaration cannot be used with result builder 'ViewBuilder'.
static var previews: some View {
ContentView()
}
}
Struct Name: View {
// some code ...
var body: some View {
Text"some text"
// some code ...
Struct Name: View {
var body: some View {
Text"some text"
Struct Name: View {
var body: some View {
Text"some text"