title: How do you access scrollViewDidScroll from a UIViewController
body: <p>I have a view controller with a UIScrollView embedded as a sub view.  I embed it as follows: </p>
  
  <p>CaptionViewController : UIViewController</p>
  
  <p>Inside ViewDidLoad</p>
  
  <pre><code>scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
  scrollView.contentMode = (UIViewContentModeScaleAspectFit);
  scrollView.contentSize = CGSizeMake(3200, 320);
  scrollView.pagingEnabled = YES;
  [self.view addSubview:scrollView];
  </code></pre>
  
  <p>Next I'm trying to wire up the scrollViewDidScroll event so I can execute some code each time the user swipes the scroll view.  However, I can figure out how to access this event.  I think the answer lies in delegation somehow.  I tried importing UIScrollView.h and setting the scrollView delegate to the CaptionViewController as follows:</p>
  
  <pre><code>[scrollView setDelegate:self]
  </code></pre>
  
  <p>Still I cannot access scrollViewDidScroll.  Can someone please point me in the right direction?</p>