So I have the class Caddy:
class Caddy{
var caddyName: String
var phoneNumber: Int
var email: String
var password: String
var caddyRank: String
var caddyLocation: Int
var proPic: UIImage
}
I have a array of these custom objects, caddyList
.
I need to reference a specific object in the array using a string caddyName
.
I then need to change a value of that specific object, specifically the caddyLocation
value.
How can I accomplish this using Swift 2.0?