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: