title: How to set the activity indicator in the navigation bar?
body: <p>I am new to iphone development. I want to set an activity indicator in the navigation bar. I see my activity indicator below the navigation bar. My code is here</p>
  
  <pre><code>- (IBAction) gomethod : (id) sender {
      xxMapSubviewcontroller = [[XxMapSubviewcontroller alloc] init];
      [self.navigationController pushViewController:xxMapSubviewcontroller animated:YES];
  
      activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
      activityIndicator.frame = CGRectMake(0.0, 0.0, 20.0, 20.0);
      [activityIndicator startAnimating];
  
      [xxMapSubviewcontroller.view addSubview:activityIndicator];
  }
  </code></pre>
  
  <p>How can i set my activity indicator in the navigation bar? Please help me out. Thanks.</p>