UIImagePickerController快门检测

时间:2014-02-06 14:58:28

标签: objective-c events uiimagepickercontroller

有没有办法检测相机何时拍完照片?

目前我正在使用以下方法:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    [picker dismissViewControllerAnimated:YES completion:nil];
    NSLog(@"END");
    _showAlert = NO;
    _alertIsShowing = NO;
    if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
        UIImageWriteToSavedPhotosAlbum([info objectForKey:@"UIImagePickerControllerOriginalImage"], nil, nil, nil);
        _endAlerts = YES;
    }
    _imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
    _saveBtn.hidden = NO;
}

用户点击“使用照片”按钮后触发。我希望在图像选择器视图中捕获图像后立即触发。

1 个答案:

答案 0 :(得分:0)

这样做的唯一方法就是创建我自己的叠加层,这本身就证明是后端的痛苦。