Updated for Xcode 14.2
This usually happens because you accidentally created a view without filling in its contents, like this:
struct DetailView: View {
var body: some View {
}
}
If you created that view as a placeholder, just give it so temporary content to make the compiler happy, like this:
struct DetailView: View {
var body: some View {
Text("Placeholder")
}
}
SAVE 50% To celebrate WWDC23, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.