title: How can I create a activity indicator in middle of view programmatically?
body: <p>I am working with an app which parses an feed online. When I click the refresh button, it takes some time to re parse the file and show its data. I want an activity indicator in the middle of the view when I click refresh button. And when parsing is done, that indicator should hide.</p>
  <p>I am using this code but it is not working:</p>
  <pre><code>- (IBAction)refreshFeed:(id)sender
  {
     UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
     [self.view addSubview:spinner];
  
     [spinner startAnimating];
  
     // parsing code code
      
     [spinner release];
  }
  </code></pre>