-1
コードを却下:B_UIViewControllerでA_UIViewController presentViewController B_UIViewController presentViewController UIImagePickerControllerはA_UIViewControllerにA_UIViewController
PrestBViewController *aviewcontroller = [[PrestBViewController alloc] init];
[self presentViewController:aviewcontroller animated:YES completion:nil];
コード:
-(void)presentAction {
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = (id)self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:imagePickerController animated:YES completion:nil];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[picker.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}
私は、コードを実行すると、それは時にクラッシュ:
[picker.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
ことができます誰も助けてくれる?
を試してみて、クラッシュが何を言うのでしょうか? – Joshua
エラーログを追加する –