-3

In my app has a button that opens the browser and my application was for background. I just want to close the app when the home button is clicked.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • As I was saying earlier: Why is this important to you? As an interesting issue: You don't know *why* the home button is being pressed; it might be to leave your application; but it might also very well be to jump out quickly to turn on an internet radio player or similar. Maintain state; for 99 users out of a 100 it's the Right Thing™ – Williham Totland Jul 08 '11 at 13:57
  • please rephrase you question, it's really difficult to understand! – Blitz Jul 08 '11 at 13:57
  • Same question as [this](http://stackoverflow.com/questions/6625134/iphone-identify-home-button-pressed) ? – Nick Bull Jul 08 '11 at 14:45
  • Theres times when you want to do it for security reasons. (Enterprise apps mainly). Please don't down vote based on the fact YOU don't see a point to it. Note: you CAN downvote b/c the question has been asked about 1000 times. – Jesse Naugher Jul 08 '11 at 14:54

2 Answers2

3

Not sure if I understand your question correctly, but if you want your app to quit (rather than going to the background), you'll have to set the UIApplicationExitsOnSuspend key in your Info.plist to YES.

omz
  • 53,243
  • 5
  • 129
  • 141
1

This has been asked and answered many times. I just answered it a few hours ago:

to load the data when application starts in ipad

Community
  • 1
  • 1
fzwo
  • 9,842
  • 3
  • 37
  • 57