- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Acquired additional time
UIDevice *device = [UIDevice currentDevice];
BOOL backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {
backgroundSupported = device.multitaskingSupported;
}
if (backgroundSupported) {
backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
[application endBackgroundTask:backgroundTask];
backgroundTask = UIBackgroundTaskInvalid;
}];
}
// Hide keyboard
[self.textField resignFirstResponder];
}
http://stackoverflow.com/questions/12730660/application-crash-on-lock-when-japanese-keyboard-used