iOS iPad Master Detail template can't interact with detail view

Posted by CraigularB on Stack Overflow See other posts from Stack Overflow or by CraigularB
Published on 2012-09-08T21:34:54Z Indexed on 2012/09/08 21:38 UTC
Read the original article Hit count: 220

Filed under:
|
|

I have an iPad app generated from the Master-Detail template in XCode. The iPad Storyboard has under the Detail View Controller a View that holds a ScrollView which holds an ImageView.

In the DetailViewController.m file I added the following code to allow the ScrollView to move and zoom the image:

-(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
    return self.comicImage;
}

This works great on the iPhone (it's a universal app) but not the iPad; I can scroll and zoom the image on the iPhone no problem, but on the iPad it's like the ScrollView isn't responding to the touches, and I can't figure out how to pass the touches on to the ScrollView. I've already deactivated the popover controller from appearing with a right swipe like this:

self.splitViewController.presentsWithGesture = NO;

How do I make it so the user can interact with the ScrollView in the DetailViewController?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c