When I kill my iPhone app and relaunch it I have an image of the app's previous state instead of the launch image. How can I force iOS to always show the launch image?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
ignoreSnapshotOnNextApplicationLaunch method will not be called if the app is not invoked during state restoration.
If your app is NOT supporting Multitasking feature, which the UIApplicationExitsOnSuspend key in its Info.plist is Set to YES. The suggested solution will not work.
For me, I used the code below:
applicationWillResignActive is used for the situation when the app is running, you double click the home button to call the multitasking tray. The splash screen will show on the application screen. It works perfectly.
applicationWillTerminate is not working every time because the function could be never called on some stages
For my current project I wanted to force re-launch after the app is killed. I added this to the app's plist:
To insure the splash screen was correct, I used the suggestions above:
and
It is working well.
To force iOS to launch an app with its default image, call
[[UIApplication sharedApplication] ignoreSnapshotOnNextApplicationLaunch];
where you implement state preservation.From the documentation:
Also look at this question for more details.