0
I'm getting g an error when inserting var item = Item?() in the ViewController.swift file. The error says, "Cannot invoke initializer for type item with no arguments. what should I do?
3 Antworten
0
maybe you forgot to put the argument inside the () ?
like
var item = Item?(someInt: 123)
0
I thought there wasn't suppose to be one. that's what the '?' was for if the value was nil.
0
Try
var item: Item?