iOS 6.0 下 在输入中文时 按下锁屏键 导致的闪退问题

- (void)applicationDidEnterBackground:(UIApplication *)application {
 
UIDevice * device = [UIDevice currentDevice];
    BOOL backgroundSupported = NO;
    if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {
        backgroundSupported = device.multitaskingSupported;
    }
      
    __block UIBackgroundTaskIdentifier backgroundTask;
      
    if (backgroundSupported) {
        backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
            [application endBackgroundTask:backgroundTask];
            backgroundTask = UIBackgroundTaskInvalid;
        }];
    }
 
 
}

from:

posted on 2012-12-12 09:56  黯夜曦  阅读(184)  评论(0编辑  收藏  举报

导航