is their any better way to quit the application programmatically?
recently i made a radio application that have a user setup to set a time using NSTimer for quit the app process ( i mean sleep time). when the time reaches the app should be stop its process and quit.
i used these statements to quit the app when time reaches,
[[UIApplication sharedApplication] suspend];
[[UIApplication sharedApplication] terminateWithSuccess];
theTimer=[NSTimer scheduledTimerWithTimeInterval:(1.0/1.0) target:self selector:@selector(countTime) userInfo:nil repeats:YES];
counter-=1;
timeLeft.text=[NSString stringWithFormat:@" %d",counter];
if (counter==0.0) {
[theTimer invalidate];
[[UIApplication sharedApplication] suspend];
[[UIApplication sharedApplication] terminateWithSuccess];
is their any problem by using [[UIApplication sharedApplication] suspend]; [[UIApplication sharedApplication] terminateWithSuccess]; methods
any other better way to quit the app, or at least freeze the app process.. i need help?