I have number of images and they are named as image0, image1, image2..., image(x).
My question is how can I access their name because I want to put all of them in array like:
@IBOutlet weak var image0: UIImageView!
@IBOutlet weak var image1: UIImageView!
@IBOutlet weak var image2: UIImageView!
@IBOutlet weak var image3: UIImageView!
@IBOutlet weak var image4: UIImageView!
@IBOutlet weak var image5: UIImageView!
...
@IBOutlet weak var image15: UIImageView!
var counter: Int = 0
var items :[[UIImageView]] = []
for i in 0..<4{
for j in 0..<4{
items[i][j]=image(counter) //this line should be something that image0,1..x assign to the array
counter += 1
}
}
}