title: Adding an activity indicator to the nav bar
body: <p>I have a view controller that starts an async network request when the user taps a button, then pushes another controller after the request finishes. In that intervening time, I want the navigation bar to display an activity indicator, so the user knows it's fetching data. I have this code in the IBAction for the button:</p>
  
  <pre><code>self.activityIndicator = [[UIActivityIndicatorView alloc]
       initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleWhite]; 
       // I've tried Gray, White, and WhiteLarge
  [self.activityIndicator startAnimating];
  self.activityIndicator.hidden = NO;
  UIBarButtonItem* spinner = [[UIBarButtonItem alloc] initWithCustomView: self.activityIndicator];
  self.navigationItem.rightBarButtonItem = spinner;
  </code></pre>
  
  <p>The indicator does not appear, but this code is getting called. I've looked at other posts on the topic, and they say to do exactly this. The UI thread does not appear blocked during the call (I can tap other buttons and navigate a different path while waiting).
  Am I missing something?</p>