jweinst1
6/2/2016 - 10:03 PM

holds multiple types of values in swift

holds multiple types of values in swift

//tuple of initialized values
var value = (int:0, string:"", bool:false)

//general type of struct
struct obj {
    var int:Int?
    var string:String?
    var bool:Bool?
}
//allows initialization of values on the fly
var f = obj()
f.int = 6
f.int