I have an appdelegate that contains a lot of objects, which are initialized and
accessed from various places in the App.
I have a view controllers also in the appdelegate, and at some point in the Application, i need all of that to be reinitialized like the app is firstly run. and the appdelegate is firstly initialized.
How can i achieve that?
the [appDelegate finishLoadingWithOptions:nil]
didn't work for me, because it doesn't
reinitialize the view controller which i connect using IBOutlet.
Please don't advise me to do it differently, because i am working on
project that is not of my work, and poorly documented.
Asked
Active
Viewed 2,597 times
0

Bassel Shawi
- 604
- 4
- 11
- 29
-
Fixing it the right way is probably going to go better for you than doing this. – uchuugaka Jul 09 '13 at 11:37
1 Answers
2
Sounds like you basically want to totally restart your app. If that's the case, this previous question is going to be your best bet (I'm marking this as a duplicate as well for that reason).
That said, I think it would be well worth spending some time pulling out the data from your app delegate into something more appropriate. The application delegate is certainly convenient for storing data used throughout your app, but it's not really appropriate.
I know you say "please don't advise me to do it differently", but even though it's not your own code you could still re-factor it and make it better. Hopefully you'll be able to!