I\'m a Swift newbie and I\'m trying to get my head around using Structs with optional properties. I\'ve done quite a bit of searching and got something that works but it fee
hope this could help you
struct Business {
let name : String
var web : String?
var address: String?
// you also need use question mark in init progress
init(name: String, web: String?, address: String?) {
self.name = name
self.web = web
self.address = address
}
}
Once you create a object you could use nil on your optional value For example :
var newBusiness = Business(name: "AWS", web: nil, address: nil)