title: How do I hook up a button in the UINavigationBar?
body: <p>I dropped a <code>UINavigationBar</code> onto the XIB form.  Then I dropped a <code>UIButton</code> on the form (not on the <code>UINavigationBar</code>).  I changed the type to <code>InfoLight</code> (so that it looks like an Info symbol).  </p>
  
  <p>I then dragged the UIButton onto the <code>UINavigationBar</code> and set it to be the right button.  It magically changes the type from <code>UIButton</code> to <code>UIButtonBarItem</code> as a result of the drag.</p>
  
  <p>Why didn't I just dragged the <code>UIButton</code> onto the <code>UINavigationBar</code> to begin with?  Because, once the button is there, Interface Builder won't let you change the type to <code>InfoLight</code> for whatever reason. </p>
  
  <p>The in the adjoining .h file, I created a declaration for the <code>IBAction</code></p>
  
  <pre><code>- (IBAction) btnInfoClick; 
  </code></pre>
  
  <p>Then in the .m file, I wrote the implementation:</p>
  
  <pre><code>- (IBAction) btnInfoClick {
      // kick off the about screen
      // code follows
  }
  </code></pre>
  
  <p>How do I now hook up the button on the navigation bar to my btnInfoClick function?  </p>
  
  <p>Or am I going about it the wrong way to begin with?</p>
  
  <p>I should note that if I simply drag a button from the Library straight onto the navigation bar, I can click on the File Owner icon, and then drag the btnInfoClick <code>IBAction</code> onto the button.  In this case, the click event fires fine.</p>
  
  <p>However, in the scenario where I first drag the button elsewhere and then onto the navigation bar, the event never fires.  Not sure what I am doing wrong.</p>