I am writing a really simple app which should be quick to use. I therefore want to have a button that performs a function then causes the app to exit once this function is done.
Firstly is this ok with Apple's rules, the area seems a little grey. And secondly if this is ok what code should I use? I've tried
[[UIApplication sharedApplication] terminateWithSuccess];
which does exit the app but I have data which needs saving on the way and this function never gets called...
-(void)applicationWillTerminate:(NSNotification *)notification
Any tips would be great.