Im using Swift 3
Wondering whether any method is available to check if all the properties in an object has value / nil
Eg:
class Vehicle {
var name : String?
var model: String?
var VIN: String?
}
let objCar = Vehicle()
objCar.name = "Volvo"
if objCar.{anyProperty} ! = nil {
//Go to other screen
}
Im in search of the {anyProperty} method where it returns true only if I have values for all properties of objCar. In our case, objCar has no model and VIN and so {anyProperty} is false and will come out of if loop
Pls advice