0

スクロールビューから選択した画像が他のView Controllerに渡されないのはなぜですか?

- (void)tap:(UITapGestureRecognizer *)gesture{

    CGPoint touchPoint = [gesture locationInView:_scroller];

    int tapOnView = (touchPoint.x / 1024) + 1;

    NSString *imageName = [NSString stringWithFormat:@"S%d.png", tapOnView];

    UIImage *photo = [UIImage imageNamed:imageName];

    NSLog (@"the image selected is %@",imageName);

    PaintViewController *paintVC = [self.storyboard instantiateViewControllerWithIdentifier:@"paintViewController"];
    [paintVC.tempDrawImage setImage: photo];
    [self.navigationController pushViewController:paintVC animated:YES];    
}

私のプロジェクトへのリンク

4

1 に答える 1