title: What is the difference between setting the delegate in Interface Builder vs using setDelegate:?
body: <p>I'm trying to set the delegate for a scroll view using Interface Builder.</p>
  
  <p>If I have code like this:</p>
  
  <pre><code>MyScrollViewDelegate * delegate = [[MyScrollViewDelegate alloc] init];
  [scrollView setDelegate:delegate];
  </code></pre>
  
  <p>in viewDidLoad, everything works perfectly.</p>
  
  <p>If I open Interface Builder, add an NSObject and set the class to MyScrollViewDelegate, then link the scrollView's delegate to my instance of MyScrollViewDelegate and inspect [scrollView delegate] inside viewDidLoad, it looks like an instance of MyScrollViewDelegate, and I can interact with it, set proprerties etc, looks good.</p>
  
  <p>However, when I scroll inside the scroll view I get an NSInvalidArgumentException:</p>
  
  <pre><code> *** -[NSCFArray scrollViewDidScroll:]: unrecognized selector sent to instance 0x3d319a0
   *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFArray scrollViewDidScroll:]: unrecognized selector sent to instance 0x3d319a0'
  </code></pre>
  
  <p>So, questions:</p>
  
  <ol>
  <li>What is the difference between setting the delegate in Interface Builder vs using setDelegate:?</li>
  <li>Why is "[NSCFArray scrollViewDidScroll:]" in the console, not, [MyScrollViewDelegate scrollViewDidScroll:]?</li>
  <li>What could I be doing wrong?</li>
  </ol>