Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Nov 3, 2009, 07:50 AM   #1
macrumors member
Join Date: Oct 2009
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?
milktooth is offline   0 Reply With Quote
Old Nov 3, 2009, 07:55 AM   #2
robbieduncan's Avatar
Join Date: Jul 2002
Location: London
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...
robbieduncan is offline   0 Reply With Quote
Old Nov 3, 2009, 07:56 AM   #3
macrumors member
Join Date: Jul 2009
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.
Troglodyte is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Complicated iPod touch home button problem. caspersoong iPod touch 8 Apr 19, 2012 12:16 PM
Home button Thetonyk123 iPod touch 2 Sep 16, 2011 06:43 AM
Broken Home Button. bob616 iPhone 8 Apr 25, 2011 08:07 AM
Crooked Home Button on iPad 2 oscarod iPad Tips, Help and Troubleshooting 2 Apr 4, 2011 05:35 PM
iPhone slow to wake when pressing home button biffarino iPhone Tips, Help and Troubleshooting 2 Sep 6, 2010 09:02 AM

All times are GMT -5. The time now is 02:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC