简体   繁体   中英

iphone how do I detect my app was pushed to background?

I had written an app for iPhone 3. The app calls safari and while it does that it exits out. Next time when it is called it loads from scratch.

But with iPhone 4 this behavior has changed. I find that my app was in the same where I left it before I opened safari.

How do I exit my app while it is sent to background ? (iPhone 3 like behavior)

or is there any delegate that I can use to detect if my app has gone to background and again came to forground ?

thank you !

您可以在Info.plist中将名为UIApplicationExitsOnSuspend的键设置为YES

您可以实现applicationWillResignActive ::在应用终止时或在进入后台的iOS4上调用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM