If your web view exclusively consists of image links, you can modify your current view controller to conform to the UIWebViewDelegate protocol like this:
- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType {
// In this section, you create a new view controller from your storyboard and pass the image URL to it. The new view controller should be able to display the image in an image view or any other desired way. Then, return NO to prevent the web view from loading the request, so that the user only sees your links.
SecondViewController* second = [self.storyboard instantiateViewControllerWithIdentifier:@"secondController"];
second.urlRequest = request;
[self.navigationController pushViewController:second animated:YES];
return NO;
}
Keep in mind that the code above assumes certain conditions:
You must have a property named urlRequest in your SecondViewController class.
Your navigation controller should include your FirstViewController.
You are utilizing storyboards and the ID of your SecondViewController is set as secondController.