dannymout dannymout - 1 year ago 68
iOS Question

Initialize an array that will have multiple value types in Swift

How would I be able to initialize an array that will contain multiple value types.

Usually, I'd initialize it by typing this:

var array = [Int]()

Leo Leo
Answer Source

You can use Any

var array = [Any]();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download