您好,我是在iphone的研究与开发初学者。我正在为iphone4兼容iPhone应用程序。 我正在显示一个警报视图,并选择一个是导航到brouwser.its确定,但我的应用程序将在background.but我希望它终止和shuld重新启动时单击应用程序图标。
if (alertView.tag==222) {
if (buttonIndex==0) {
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"http://itunes.apple.com/"]];
}
}
当我点击主页按钮时,它也正在走向bground。 我想要应用程序应该从后台终止也。
exit()怎么样? –
@Daniel你不应该叫退出。 – rckoenes
其他可能的重复:http://stackoverflow.com/questions/3227736/iphone-avoid-save-state,http://stackoverflow.com/questions/5565730/iphone-app-startup,http://stackoverflow.com/questions/6127560/how-do-i-tell-ios-that-i-do-not-the-app-to-stay-in-the-the-the-background,http://stackoverflow.com/questions/4437619/make-app-without-multitasking-support,http://stackoverflow.com/questions/6516519/how-to-restart-a-application-without-going-to-recent-worked-page-when-we退出 – Codo