-1

私はこの方法で UIImagePickerController をロードしています:

- (void) launchCamera {

// Set up the camera
CustomCamera *cameraController = [[CustomCamera alloc] init];
cameraController.sourceType = UIImagePickerControllerSourceTypeCamera;
cameraController.delegate = self;

cameraController.showsCameraControls = NO;
cameraController.navigationBarHidden = YES;
cameraController.toolbarHidden = YES;

// overlay on top of camera lens view
UIImageView *cameraOverlayView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"camera_overlay.png"]];
cameraOverlayView.alpha = 0.0f;
cameraController.cameraOverlayView = cameraOverlayView;

// animate the fade in after the shutter opens
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelay:2.2f];
cameraOverlayView.alpha = 1.0f;
[UIView commitAnimations];

[self presentModalViewController:cameraController animated:YES];
}

問題は、それを却下する方法がわからないことです。やってみると

[cameraController dismissViewControllerAnimated:YES completion: nil];

赤いエラーが表示されます。cameraController は単なる UIImagePickerController です

4

1 に答える 1