Hello,
I have a project with 6 simple SwiftUI files, each presenting simple views (Text, Image, Slider, DatePicker...).
When I create file number 7 (and following) I get an error on the entry to the VStack { (Unable to infer complex closure return type; add explicit type to disambiguate.)
I have tried cleaning the build folder. Closing the project, Xcode, and restarting them
If I create a new projet and paste the below in it compiles and executes rightly.
Any ideas ?
Cheers
Lars
import SwiftUI
struct Slider : View {
@State var celsius: Double = 0
var body: some View {
VStack {
Slider(value: $celsius, from: -100.00, through: 100.00, by: 1.0)
Text("\(celsius) Celsius is \(celsius * 9 / 5 + 32) Fahrenheit")
}
}
}
#if DEBUG
struct Slider_Previews : PreviewProvider {
static var previews: some View {
Slider()
}
}
#endif