I have the following code
class Test: UIViewController {
var imagesOfChef = [Int : chefImages]()
struct chefImages {
var objidChef: String!
var imageChef: UIImage!
}
}
I fill up this dictionary as soon as the user opens the application. But i want it to be available also in other Views (swift files)
Lets say in this class
class Test2: UIViewController{
}
How can i create a singleton for this Dictionary so it can be available to other views?
Thanks for your time!