title: Having trouble changing a UIBarButtonItem's image
body: <p>I'm trying various ways of changing a UIBarButtonItem's image once it has been pressed, without any luck.</p>
  
  <pre><code>// bookmarkButton is a property linked up in IB
  -(IBAction)bookmarkButtonTapped:(id)sender
  {
  NSLog(@"this action triggers");
  // attempt 1
  UIBarButtonItem* aBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"bookmarkdelete.png"] style:UIBarButtonItemStylePlain target:self action:@selector(bookmarkButtonTapped:)];
  bookmarkButton = aBarButtonItem;
  [aBarButtonItem release];
  
  // attempt 2
  bookmarkButton.image = [UIImage imageNamed:@"bookmarkdelete.png"];
  }
  </code></pre>
  
  <p>Is there another way to do this?</p>