title: Is there a better way to hide the backBarButtonItem than this?
body: <p>I have a way of hiding the back button used by the navigation controller. It's set by the previous controller, not the one managing the current view, and that makes it tricky to get to. I needed to do this in editing mode so that I could prevent the user from navigating away from the screen.</p>
  
  <pre><code>if(self.editing) {
      // Get rid of the back button   
      UIView *emptyView = [[UIView alloc] init];;
      UIBarButtonItem *emptyButton = [[[UIBarButtonItem alloc] initWithCustomView:emptyView] autorelease];
      [self.navigationItem setLeftBarButtonItem:emptyButton animated:YES];
  } else {
      // Restore the back button
      [self.navigationItem setLeftBarButtonItem:nil animated:YES];        
  }
  </code></pre>
  
  <p>Is there a better way to do this?</p>