title: UINavigationBar UIBarButtonItem works on left but not on right
body: <p>I have two buttons on my navbar. One on the left and one on the right. The button on the left works but the one on the right does not work. If I swap the buttons, recompile and load the issue persist with the right button regardless of which button is in the right spot of the bar.</p>
  
  <p>Also while the left button works as soon as I try to use the right button the left button stops working too.</p>
  
  <p>How do I make the right button work? Below is the code.</p>
  
  <pre><code>UINavigationBar *NavBar = [[UINavigationBar alloc] init];
  [NavBar sizeToFit];
  [self.view addSubview:NavBar];
  UIBarButtonItem *cmdBack = [[UIBarButtonItem alloc] initWithTitle:@"Back"
                                                              style:UIBarButtonItemStyleBordered
                                                             target:self
                                                             action:@selector(cmdBackClicked:)];
  UIBarButtonItem *cmdAddDevice = [[UIBarButtonItem alloc] initWithTitle:@"Add Device"
                                                                   style:UIBarButtonItemStyleBordered
                                                                  target:self
                                                                  action:@selector(cmdAddDeviceClicked:)];
  UINavigationItem *NavBarItems = [[UINavigationItem alloc] initWithTitle:@"Settings"];
  NavBarItems.leftBarButtonItem = cmdBack;
  NavBarItems.rightBarButtonItem = cmdAddDevice;
  NavBar.items = [NSArray arrayWithObjects:NavBarItems, nil];
  </code></pre>
  
  <p>The functions for the buttons are these</p>
  
  <pre><code>- (void) cmdBackClicked:(id)sender
  {
      [self.view removeFromSuperview];
  }
  
  - (void) cmdAddDeviceClicked:(id)sender
  {
      vcAddDevice *ViewAddDevice = [[vcAddDevice alloc] initWithNibName:@"vcAddDevice"     bundle:nil];
      [ViewAddDevice SetEditDeviceMode:[NSString stringWithFormat:@"No"]];
     [self.view addSubview:ViewAddDevice.view];
  }
  </code></pre>
  
  <p>In the .h file I have this.</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "vcAddDevice.h"
  
  @interface ViewControllerSettings : UIViewController&lt;vcAddDeviceControllerDelegate, UITableViewDelegate, UITableViewDataSource&gt;
  
  - (IBAction) cmdBackClicked:(id) sender;
  - (IBAction) cmdAddDeviceClicked:(id) sender;
  
  @end
  </code></pre>