title: Detect direction of UIScrollView scroll in scrollViewWillBeginDragging
body: <p>I did google enough, &amp; I did check posts like these ( <a href="https://stackoverflow.com/questions/2543670/iphone-sdk-finding-the-direction-of-scrolling-in-uiscrollview">Finding the direction of scrolling in a UIScrollView?</a> ) in stackoverflow before posting this. I have a dynamic number of photos in an iPhone App, that am displaying through <code>UIScrollView</code>. At any point in time, I have only 3 photos being displayed in the scroll-view. When I have, say 4 photos, in total:
  1st photo : displayed at offset 0.0
  2nd photo : displayed at offset 320.0
  3rd photo : displayed at offset 640.0</p>
  
  <p>Now, when the user scrolls to the 4th photo, the scroll-view resets to 0.0 offset. If the user tries to scroll 'beyond' the 4th photo, scrolling should stop in the right-direction only (so that user doesn't scroll 'beyond'). But currently, the user 'is able' to scroll beyond the last photo ; however, I detect this programmatically &amp; reset the offset. But it doesn't look neat, as the user sees the black background momentarily. I want to detect that the user has started scrolling 'right' (remember, scrolling 'left' i.e. to the 'previous' photo is okay) in <code>scrollViewWillBeginDragging</code>, so that I can stop any further scrolling to the right.</p>
  
  <p>What I tried:</p>
  
  <ol>
  <li>Trying using <code>self.scrollView.panGestureRecognizer</code>'s
  <code>translationInView</code> isn't working, because there is no
  <code>panGestureRecognizer</code> instance returned in the first place (!),
  though the UIScrollView API claims so.</li>
  <li>Detecting this in <code>scrollViewDidEndDecelerating</code> is possible, though
  it'll not serve my purpose.</li>
  </ol>