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")
}
}
SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.