controls reference dictionary

Is it possible to hold references to button controls in a dictionary?

Accepted Reply

Yes.

let b1: UIButton = …
let b2: UIButton = …
let b3: UIButton = …
let d = ["a": b1, "b": b2, "c": b3]

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

Yes.

let b1: UIButton = …
let b2: UIButton = …
let b3: UIButton = …
let d = ["a": b1, "b": b2, "c": b3]

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"