Does iphone 4 have automatic data persistence?
I loaded some app projects that I had been developing using the iPhone 3.1.3 Simulator. Now I got the 4.0 package, and for some reason when I hit the home button of the simulator to go the home screen and then go back to the app, it's in the same开发者_如何转开发 position as I left it. Is this now standard? What if I don't want it to do this? I'd rather have it restart every time.
What you're describing is fast App switching, which is new in iOS 4.
If you want your application to quit each time the user presses the Home button, add the UIApplicationExitsOnSuspend
property key to your info.plist and set it to YES (check the box).
精彩评论