iOS App Launch Image After a Kill

前端 未结 5 2404
-上瘾入骨i
-上瘾入骨i 2021-02-09 06:16

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?

5条回答
  •  耶瑟儿~
    2021-02-09 06:28

    For my current project I wanted to force re-launch after the app is killed. I added this to the app's plist:

    Application does not run in background

    To insure the splash screen was correct, I used the suggestions above:

    - (void)applicationWillResignActive:(UIApplication *)application {
    [[UIApplication sharedApplication] ignoreSnapshotOnNextApplicationLaunch]; }
    

    and

    - (void)applicationDidEnterBackground:(UIApplication *)application {
    [[UIApplication sharedApplication] ignoreSnapshotOnNextApplicationLaunch]; }
    

    It is working well.

提交回复
热议问题