it's kind of tough to know exactly what you're doing. If I'm correct you want to create a new view controller when the user clicks on the image right? Here's one way that you can do this.
1) You can create an instance of the View Controller that you want to pass that image to, and then set the image for that instance to the selected image. Something like this:
@interface NewViewControllerToStoreImage : UIViewController
@property (strong, nonatomic) UIImageView *imageView; //You need to display this image somewhere on the view for the view controller.
- (NewViewControllerToStoreImage *) init; // you need to write the implementation for this method so your view controller can look the way you want it to.
@end
@implementation NewViewControllerToStoreImage
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
}
@end
Then in the method you've created.
- (void)singleTapGestureCaptured:(UITapGestureRecognizer *)gesture{
CGPoint touchPoint = [gesture locationInView:scrollView];
NSUInteger touchedPage = floorf(touchPoint.x / scrollView.frame.size.width);
if ([imageArray count] > 1) {
touchedPage = touchedPage % ([imageArray count] - 1);
}
//self.selectedImage is a placer for the image that is selected. I'm not sure where or how you're storing that selected image.
UIImage *image = self.selectedImage;
NewViewControllerToStoreImage *newViewController = [[NewViewControllerToStoreImage alloc] init];
newViewController.imageView.image = image;
//Then assuming that you're using a UINavigationController. This line will push that new view controller onto the navigation controller's view controllers and display it on screen.
[self.navigationController pushViewController:newViewController animated:YES];
}
Hope this works for you. And hope it makes sense, like I said, it's kind of hard to answer to based off the vague question.