I am trying to create a simple dictionary that holds String keys and UIImageView as values. I have UIImageView variables declared from the storyboard.
@IBOutlet weak var image0: UIImageView!
@IBOutlet weak var image1: UIImageView!
var buttonImagePair: Dictionary<String,UIImageView> = ["button0":image0!, "button1":image1!]
This code gives me the following error:
'gameViewController.Type' does not have a member named 'image0'
What am I doing wrong?
EDIT: I declared gameViewController as a class. It is called from the main page of the app (when a user clicks a button as a Triggered Segue) to load page 2 of the app.
class gameViewController: UIViewController