0

使用するpushViewControllerと、ナビゲーション ボタンのある空白のビューが表示されますが、そのSaved photos理由がわかりません。ReportViewController画像を選択してから移動したい。

これは私のコードで、問題ないようです。何が間違っている可能性がありますか?

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{

//Geting the image from the camera
image = [info objectForKey:UIImagePickerControllerOriginalImage];

ReportViewController *imageSelectionVC = [[ReportViewController alloc] init];
[imageSelectionVC.imageReport setImage:image];

    [picker pushViewController:imageSelectionVC animated:YES];
}
4

1 に答える 1

0

コメントが言うように、ピッカーを閉じて、新しいコントローラーをアニメーション コントローラーにプッシュする必要があります (あると仮定します)。

これは正しいコードです:

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
    UIImage* image = [info objectForKey:UIImagePickerControllerOriginalImage];

    [picker dismissViewControllerAnimated:YES completion:^{
        ReportViewController *imageSelectionVC = [[ReportViewController alloc] init];
        [imageSelectionVC.imageReport setImage:image];

        [self.navigationController pushViewController:imageSelectionVC animated:YES];
    }];
}
于 2013-10-08T09:36:37.440 に答える