title: Weird UIScrollView behavior after zooming in landscape mode
body: <p>I'm trying to learn how to display a scroll- and zoomable image in iOS.</p>
  
  <p>While playing with the <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/sample_code/Imaginarium_2.zip" rel="nofollow noreferrer">Imaginarium example</a> from 
  <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall" rel="nofollow noreferrer">CS 193P iPhone Application Development</a>, I encountered the following problem:</p>
  
  <p>If I scroll as far down and to the right as possible, I can see the the bottom right corner of the image (first screenshot). This is the expected behavior. </p>
  
  <p>As soon as I zoom a little bit and again try to scroll as far down and to the right as possible, the UIScrollView prevents me from scrolling down far enough to see the bottom of the image, but allows me to scroll farther to the right than necessary to see the right edge of the image (second screenshot).</p>
  
  <p><img src="https://i.stack.imgur.com/SaBP5.jpg" alt="Bottom right corner before zooming">
  <img src="https://i.stack.imgur.com/anWib.png" alt="Bottom right corner before zooming"></p>
  
  <p>I can reproduce it in the iOS 5.0 simulator (built with Xcode 4.3.0) and in the iOS 5.1 simulator and an actual iPad running iOS 5.1 (built with Xcode 4.3.2).</p>
  
  <p>It seems to work fine in portrait mode. Any ideas how to fix this?</p>