Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 图像选择器允许编辑的问题_Ios_Objective C_Ipad_Uiimagepickercontroller - Fatal编程技术网

Ios 图像选择器允许编辑的问题

Ios 图像选择器允许编辑的问题,ios,objective-c,ipad,uiimagepickercontroller,Ios,Objective C,Ipad,Uiimagepickercontroller,当用户打开他们的相机时,我有这个方法。我将“允许编辑”设置为“是”,但在编辑屏幕上,方形裁剪框仅出现在iphone上,而不是iPad上。我错过了什么 - (void)useCameraRoll { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { UIImagePickerController *imag

当用户打开他们的相机时,我有这个方法。我将“允许编辑”设置为“是”,但在编辑屏幕上,方形裁剪框仅出现在iphone上,而不是iPad上。我错过了什么

- (void)useCameraRoll 
{
    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum])
    {
        UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
        imagePicker.delegate = self;
        imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        imagePicker.mediaTypes = @[(NSString *) kUTTypeImage];
        imagePicker.allowsEditing = YES;
        if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
        {
            [self presentViewController:imagePicker animated:YES completion:nil];
        }
        else
        {
            dispatch_async(dispatch_get_main_queue(), ^{

                [self setModalPresentationStyle:UIModalPresentationFormSheet];
                [self.navigationController presentViewController:imagePicker animated:YES completion:nil];
            });
        }

    }
}
和委托方法

- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    NSString *mediaType = info[UIImagePickerControllerMediaType];

   [self dismissViewControllerAnimated:YES completion:nil];

    if ([mediaType isEqualToString:(NSString *)kUTTypeImage])
    {
        theCustomImage = info[UIImagePickerControllerEditedImage];
        [self roundedCorners];
        [self placeImage:theCustomImage];
        customImage = true;
        UIImageWriteToSavedPhotosAlbum(theCustomImage, self, @selector(image:finishedSavingWithError:contextInfo:), nil);
    }
}

尝试删除表单页演示文稿。只是一种预感,我无法验证它是否有效。没有帮助。谢谢你的装扮