I would like to know what the best way is to pass variables between classes.
I have one class named "storage" where I want to store variables
I have two view controllers, one where the information comes from that I would like to store in the storage class and one where I would like to retrieve the data I've stored in class storage.
(I can't use segues because I'm not using use the storyboard)
I have one class named "storage" where I want to store variables
Code:
class storage {
var text: String
var location: String
}
I have two view controllers, one where the information comes from that I would like to store in the storage class and one where I would like to retrieve the data I've stored in class storage.
(I can't use segues because I'm not using use the storyboard)