"padding()" should be ".padding()"
As in:
struct ContentView: View {
var body: some View {
VStack {
Text("Hello, world!")
.padding()
Text("Another Line")
}
}
}
"padding()" is an instance method, so calling it without the leading ".", as you do, probably causes something horrible to happen, which causes the crash.
(Since it will return a function, not a View)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: