I'm sure this is a newbie question.
I have most of my code in my main view controller. Works fine.
I'd like to be told when the app is launching, or when the iPhone is going to sleep.
I can add this:
- (void)applicationWillTerminateUIApplication *)application
to my AppDelegate class, and that's fine. But my AppDelegate doesn't know the objects I want to deal with at shutdown.
But I'd like to add it to my view controller class. If I type it in, it says it doesn't know what applicationWillTerminate means.
Alternatively, I can catch it in the AppDelegate class, then call a instance method in my ViewController class. But I don't know how to do that either.
So, some newbie help would be appreciated! Thank you!
I have most of my code in my main view controller. Works fine.
I'd like to be told when the app is launching, or when the iPhone is going to sleep.
I can add this:
- (void)applicationWillTerminateUIApplication *)application
to my AppDelegate class, and that's fine. But my AppDelegate doesn't know the objects I want to deal with at shutdown.
But I'd like to add it to my view controller class. If I type it in, it says it doesn't know what applicationWillTerminate means.
Alternatively, I can catch it in the AppDelegate class, then call a instance method in my ViewController class. But I don't know how to do that either.
So, some newbie help would be appreciated! Thank you!