I am currently developing a multi-view app with storyboards. In each view the user can enter data, generally through text boxes or button entry. This data is then stored in arrays.
My problem is this: when I transfer back to a window, viewDidLoad
is called, and therefore resets all of the data. Is there a simple way (without simply loading my arrays back up) to retain this data, as if the viewDidLoad
was not called? Is there a method that is called when the application is loaded, as opposed to just the view? Or perhaps a way to only call the viewDidLoad
the first time?
I am aware I can solve this by loading my arrays back, I was just wondering if there's a simpler, more elegant solution.
EDIT:
It appears my view did load is triggering every time I go to another view. I am using storyboards segues.