title: UIScrollView zoom in bounce
body: <p>I have embedded an image view into a scroll view for zooming purposes. Everything works great but if the user choses to zoom in then pan in any direction the user can slightly pull the <code>ScrollView</code> off the screen bounds exposing the content i have behind the <code>scrollview</code> before bouncing back. I want to disable this bouncing when zoomed in but don't know how. This only happens when zoomed in. At normal zoom scale you can't do it. Heres my code I have gone through the <a href="https://developer.apple.com/library/ios/documentation/uikit/reference/uiscrollview_class/Reference/UIScrollView.html#//apple_ref/occ/instp/UIScrollView/bouncesZoom" rel="nofollow">UIScrollView Class Reference</a> and have commented out my attempts at disabling it but it doesn't work!</p>
  
  <pre><code>    zoomScrollView.contentSize = CGSizeMake(enlargedPhotoImageView.frame.size.width , enlargedPhotoImageView.frame.size.height);
      zoomScrollView.maximumZoomScale = 10;
      zoomScrollView.minimumZoomScale = 1;
      zoomScrollView.clipsToBounds = YES;
      zoomScrollView.delegate = self;
      zoomScrollView.zoomScale = 1;
      //zoomScrollView.alwaysBounceHorizontal = NO;
      //zoomScrollView.alwaysBounceVertical = NO;
      //zoomScrollView.bouncesZoom = NO;
  
  -(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
  
      if(scrollView == zoomScrollView){
          return enlargedPhotoImageView;
      }else{
          return nil;
      }
  }
  </code></pre>