views:

146

answers:

1

I need code for terminating the application on a button click but termination should be done with basic animation....Can anyone suggest?

I tried with exit(0) and also by using

[[UIApplication sharedApplication] terminate];

but it terminates application roughly.........

A: 

UIApplication *app=[UIApplication sharedApplication]; SEL selector=@selector(terminateWithSuccess); if([app respondsToSelector:selector]) [app performSelector:selector];

dragon
Hmm, terminate and terminateWithSuccess seem to me to be undocumented API (for pre-OS 4). Cannot legally speak to it for 4.x.My guess is that there's still no reliable way for an AppStore-distributed app to force-quit -- aside from intentionally crashing .... :-)
Joseph Beckenbach