0
- (void)applicationWillResignActive:(UIApplication *)application
    {
        NSLog(@"resign active");
    }

    - (void)applicationDidEnterBackground:(UIApplication *)application
    {
        NSLog(@"background");  
    }

    - (void)applicationWillEnterForeground:(UIApplication *)application
    {
        // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    }

    - (void)applicationDidBecomeActive:(UIApplication *)application
    {
        NSLog(@"Active");
    }

    - (void)applicationWillTerminate:(UIApplication *)application
    {
        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
    }

当我向左滑动四指时(不要完全更改应用程序),我可以看到日志 resign active,然后将四指向右移动Active

如果我用四指滑动到顶部,我可以看到resign active。之后,如果我向右滑动四指(实际上并没有关闭您看到所有正在运行的应用程序的下栏),我看不到active.

这是一个错误吗?

4

1 回答 1

1

没有。您的应用程序并没有真正再次变得活跃,对吧?当您查看任务切换器视图时,没有任何应用程序处于活动状态。

于 2013-04-15T22:19:57.360 回答