title: How to add a right bar button to a navigation bar in iphone
body: <p>I want to add a right bar button item to the navigation bar, so that on click, it performs certain a function.</p>
  
  <p>I have created the following code to add the right bar button item, but after it is done, the bar button item is not getting displayed in navigation bar:</p>
  
  <pre><code>-(void)viewDidload{
      self.navigationItem.rightBarButtonItem = 
      [[[UIBarButtonItem alloc] 
             initWithBarButtonSystemItem:UIBarButtonSystemItemAdd                                                                                                     
                                  target:self
                                  action:@selector(Add:)] autorelease];    
  }
  
  -(IBAction)Add:(id)sender
  {
      TAddNewJourney *j=[[TAddNewJourney alloc]init];
      [app.navigationController pushViewController:j animated:YES];
      [j release];
  }
  </code></pre>