|Nov 3, 2009, 08:50 AM||#1|
Request confirmation of desire to quit after pressing home button. Possible?
I'm writing a timer app.
Unlike Apple's Clock app, it cannot run in the background once the user has left the application.
Understandably, the user may not be aware of this. So, with that it mind, I would like my app to request confirmation of the user's desire to quit whenever the home button is pressed. A style sheet would pop up to inform the user of the consequences.
1. Is it possible?
2. Is it bad style?
|Nov 3, 2009, 08:55 AM||#2|
1. Not really: your app will be terminated by the OS if it does not shutdown in a timely manner. This may prevent Apple approving your app for the store
2. Very much so. The home button should always take the user back to the home screen. From iPhone Human Interface Guidelines "iPhone applications stop when users open a different application or use a device feature, such as the phone. In particular, note that users donít tap an application close button or select Quit from a menu. iPhone applications should:
*Be prepared to receive an exit or terminate notification at any time. Therefore, save user data as soon as possible and as often as reasonable.
*Save the current state when stopping, at the finest level of detail possible. For example, if your application displays scrolling data, save the current scroll position."
You should have read an understood that entire document before you started...
Sponsor me to cycle 100Km round London in the dark
|Nov 3, 2009, 08:56 AM||#3|
I don't think you can stop the app from terminating. There is a UIApplication delegate method called applicationWillTerminate - but note, it's not asking you, it's telling you.
Even if you could figure out a way to do this, most likely it would break the interface guidelines and Apple would reject it.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|iPhone: Is there anyway to wake up a device without pressing power/home button?||TheSacredSoul||Jailbreaks and iOS Hacks||33||May 3, 2014 11:23 AM|
|iPad: iPad air with 7.0.3 stutter after pressing home button||NovemberWhiskey||iPad||6||Nov 3, 2013 10:59 AM|
|When pressing home button from within app... Delay||vaultwit||iOS 7||8||Oct 1, 2013 05:55 PM|
|OCD? Scared of pressing home button with dirty hands?||michael31986||iPhone||26||Nov 27, 2012 11:32 PM|
|Pressing around home button as if pressing home button||SasquatchSurviv||iPad Tips, Help and Troubleshooting||1||Nov 21, 2012 03:12 PM|
All times are GMT -5. The time now is 11:00 PM.