title: Making UIScrollView to both scroll and zoom
body: <p>I am having some troubles making my <code>UIScrollView</code> to exhibit both scrolling and zooming. My class (which sub-classes <code>UIScrollView</code>) has a <code>UIView</code> as a sub-view, and in this sub-view I draw on a <code>CALayer</code>. As soon as the app launches, I can scroll the view, but as soon as I zoom using the pinch gesture, the scrolling feature stops working, and only the zoom works. My code:</p>
  
  <pre><code>bpmGraphView = [[UIView alloc] init];   
  //--- configure the scroll-view and add the graph-view as a subview
  [self setZoomScale:1.0];
  [self setContentSize:CGSizeMake(1000.0, 169.0)];
  [self setMultipleTouchEnabled:YES];
  [self setScrollEnabled:YES];
  self.maximumZoomScale = 20.0;
  self.minimumZoomScale = 0.05;
  self.clipsToBounds = YES;   
  self.delegate = self;   //--- set the scroll-view delegate to self  
  [self addSubview:bpmGraphView];
  </code></pre>
  
  <p>And the delegate method:</p>
  
  <pre><code>- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
      return [self bpmGraphView];
  }
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Some dimensions: My <code>UIScrollView</code> is 320x169 and it is positioned 7 pixels to the right of the left edge of the screen. The (scrollable) <code>UIView</code> inside it should have the same height, but start 30 pixels to the left of the <code>UIScrollView</code>, and end somewhere far to the right - 1000 is just a test number. The sublayer I add to <code>UIView</code> should have the same size and position as it's superview.
  I will init the <code>UIView</code> with the proper frame and report any changes in the behavior of the app.</p>