相机的“重新拍摄”和“使用照片”按钮不起作用

时间:2018-12-25 10:13:04

标签: ios objective-c camera

库链接:https://github.com/yackle/CLImageEditor

使用相机拍摄照片并使用照片通过CLImageEditor自定义库进行编辑。在库中打开图像后,返回相机视图,RetakeUse photo按钮不起作用。

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    imageInfo = [[NSDictionary alloc] initWithDictionary:info];
    UIImage *a_img = [info objectForKey:UIImagePickerControllerOriginalImage];
CLImageEditor *editor = [[CLImageEditor alloc] initWithImage:a_img];
editor.delegate = self;
   [picker pushViewController:editor animated:YES];
}

STEPS:

  1. 单击相机按钮以更新个人资料图片。
  2. 拍照,然后单击Use photo按钮,在此单击上面的方法正在调用并推动CLImageEditor控制器以修改图像。
  3. 不做任何修改,请单击“后退”按钮(它会弹出相机视图)。
  4. 现在单击RetakeUse photo按钮以拍摄新照片或再次编辑现有照片Not working

1 个答案:

答案 0 :(得分:0)

图书馆链接:https://github.com/yackle/CLImageEditor

在这个 imagepicker 中确实取消了方法

func imagePickerControllerDidCancel(_ picker:
    UIImagePickerController) {
                let editor = CLImageEditor()
                editor.dismiss(animated: true, completion: nil)
                picker.dismiss(animated: true, completion: nil)
            
        }
相关问题