I use the method performSegueWithIdentifier:sender:
to open a new ViewController
from a storyboard-file programmatically. This works like a charm.
But on every time when this method is being called, a new ViewController
would be created. Is it possible to use the existing ViewController
, if it exista? I don't find anything about this issue (apple-doc, Stack Overflow, ...).
The Problem is:
On the created ViewController
the user set some form-Elements and if the ViewController
would be called again, the form-elements has the initial settings :(
Any help would be appreciated.
Edit: I appreciate the many responses. Meanwhile, I'm not familiar with the project and can not check your answers.
You would need to make the Viewcontroller into a singleton class.