with uiimagepickercontrollerdelegate how and iphone objective-c ios4 uiimagepickercontroller

iphone - how - uiimagepickercontrollerdelegate swift 4



Error que ocurre en ios4.1(*** ERROR: FigCreateCGImageFromJPEG devolvió-12905. La entrada(null) fue 499992 bytes). (1)

Puede ser que sea Ayuda

// u also import framework "MobileCoreServices" UIImagePickerController *c = [[UIImagePickerController alloc] init]; c.delegate = self; c.sourceType = UIImagePickerControllerSourceTypeCamera; NSString *requiredMediaType; requiredMediaType = (NSString *)kUTTypeImage; imagePicker.mediaTypes = [NSArray arrayWithObject:requiredMediaType]; [self presentModalViewController:c animated:NO]; [ c release]; } - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ NSString *ItemMediaType = [info objectForKey: UIImagePickerControllerMediaType]; if ([ItemMediaType isEqualToString:(NSString *)kUTTypeImage] == YES){ UIImage *theImage = nil; if (picker.allowsEditing == YES){ theImage = [info objectForKey:UIImagePickerControllerEditedImage]; } else { theImage = [info objectForKey:UIImagePickerControllerOriginalImage]; } }

*** ERROR: FigCreateCGImageFromJPEG returned -12905. Input (null) was 499992 bytes.

Me sale un error en ios4.1 cada vez que uso el UIImagePicker [justo después de tomar un complemento]. Mi código es simple

UIImagePickerController *c = [[UIImagePickerController alloc] init]; c.delegate = self; c.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:c animated:NO]; [c release];

Aunque la aplicación. funciona bien, inusualmente ¡colapsó una vez en 100 intentos!