I need to create two instances of two classes inside a view controller that stay alive for the entire time that view is open.
Inside theese one of theese classes I need to create a NSString and a NSDate that stays alive for the entire time the class is alive.
How do I do this?
define 2 variables in the class:
Too keep the variables alive while the view is visible:
in viewDidAppear:
in viewDidDissapear:
if you need it for the entire time the class is alive move the code to the init and dealloc methods.