title: How to add a simple button to the middle of a navigation bar?
body: <p>i found a lot of topics around placing buttons on navigation bar but none showed me how to place a button at the center of the bar.
  I found an example with a segmented control but i don't need that.</p>
  
  <p>Just a button instead of the title. Is that possible? ;-)</p>
  
  <p>Edit:</p>
  
  <p>That will do it:</p>
  
  <pre><code>UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
  [titleButton setFrame:CGRectMake(0, 0, 170, 35)];
  self.navigationItem.titleView = titleButton;
  </code></pre>