< How to fix “Cannot convert value of type '() -> ()' to expected argument type '() -> _’” | How to fix images not resizing > |
Updated for Xcode 14.0 beta 1
This error usually comes up because you created the wrong kind of view by accident, and rather than using a simple view instead created a container that expected some content inside it.
Try looking for code like this:
VStack()
VStack
expects to have something inside it, so at the very least that ought to read as follows:
VStack {
EmptyView()
}
SPONSORED You know StoreKit, but you don’t want to do StoreKit. RevenueCat makes it easy to deploy, manage, and analyze in-app subscriptions on iOS and Android so you can focus on building your app.
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.