if(application.applicationState == UIApplicationStateActive) { NSLog(@"前台"); } if (application.applicationState == UIApplicationStateBackground) { NSLog(@"后台"); } if (application.applicationState == UIApplicationStateInactive) { NSLog(@"houtai"); }
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/mr_banma/article/details/47298711