< How to fix “Referencing initializer 'init(wrappedValue:)' on 'ObservedObject' requires that ‘SomeType’ conform to 'ObservableObject'" | How to fix “Missing argument for parameter 'content' in call” > |
Updated for Xcode 14.2
This rather confusing error message usually happens because you created a container but forgot to include some content inside it – you were probably just experimenting, and wrote code like this:
VStack {
}
If you just want a placeholder while you’re working on something else, use an EmptyView
to keep the compiler happy, like this:
VStack {
EmptyView()
}
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.