UIImagePickerController在不应该解雇的时候解雇

时间:2014-04-16 23:23:07

标签: ios uiimagepickercontroller

我正在尝试创建自定义相机叠加层,但遇到了一些问题。捕获视图效果很好,但我希望显示另一个视图,用户可以在捕获图像后编辑照片。问题是,拍摄照片时,带照片的视图会自动被取消。我如何解决这个问题,以便在用户拍照后我可以显示另一个视图控制器。

以下是我创建选择器的方法:

self.cameraPicker = [[UIImagePickerController alloc] init];
self.cameraPicker.delegate = self;
self.cameraPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.cameraPicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
self.cameraPicker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
self.cameraPicker.showsCameraControls = NO;
self.cameraPicker.allowsEditing = YES;
self.cameraPicker.navigationBarHidden = YES;
self.cameraPicker.toolbarHidden = YES;
self.cameraPicker.videoQuality = UIImagePickerControllerQualityTypeIFrame1280x720;
self.frontFacing = NO;
self.gridShowing = NO;
self.showingFlash = NO;


// Insert the overlay
CameraOverlayView *overlay = [[CameraOverlayView alloc] initWithFrame:CGRectMake(0, 0, 320, 568)];
self.cameraPicker.cameraOverlayView = overlay;
overlay.delegate = self;

[self.navigationController presentViewController:(UIViewController *)self.cameraPicker animated:YES completion:nil];

以下是我拍照的方法,在调用之后,viewController被解雇: ,我不想要:     [self.cameraPicker takePicture];

0 个答案:

没有答案