title: Adding selector to navigationbar button programmatically
body: <p>Hey, I am trying to add a selector to a button in my navigationbar programmatically and I can't seem to find out why it doesn't work at all. Here is the code I got:</p>
  
  <pre><code>[self.navigationController.navigationItem.rightBarButtonItem setAction:@selector(showWithLabel)];
  </code></pre>
  
  <p>Am I doing this correctly and is there anything else I should do?</p>
  
  <p>EDIT: I found out that the button was <code>nil</code>, I don't understand as it is connected to <code>rightBarButton</code> outlet.</p>
  
  <p>EDIT(Again): I found out that the navigationitem is nil, any idea where is the problem then?</p>