I am trying to pass an object to another view controller but I get an error when I try to set the property of the view controller object.
The error is pretty informative. It says the class ViewController
has no public or internal property called data
. You'll have to declare a property called data
in class ViewController
.
class ViewController: UIViewController {
var data: String?
}