title: UIBarButtonItem with custom view not properly aligned on iOS 7 when used as left or right navigation bar items
body: <p>The following code works up through iOS 6:</p>
  
  <pre><code>UIButton *myButton = nil;
  myButton = [UIButton buttonWithType:UIButtonTypeCustom];
  myButton.bounds = CGRectMake(0,0,44,30);
  // setup myButton's images, etc.
  
  UIBarButtonItem *item = nil;
  item = [[UIBarButtonItem alloc] initWithCustomView:customButton];
  </code></pre>
  
  <p>This is how the button is supposed to be aligned:</p>
  
  <p><img src="https://i.stack.imgur.com/AqFvL.png" alt="Normal positioning"></p>
  
  <p>However, on iOS 7, the button appears to be offset from the right or left by too many pixels:</p>
  
  <p><img src="https://i.stack.imgur.com/lUa8W.png" alt="Incorrect positioning on iOS 7"></p>
  
  <p>How can I get my custom bar button items to be aligned properly?</p>