title: How to set grey color background for UIActivityIndicator when loading on UIView in iOS
body: <p>I currently have a <code>UIActivityIndicator</code> appearing on screen for a second or two. I would like to set grey out the background as this appears on screen but I am not sure how to do this...</p>
  
  <p>Here's how I have initialized the indicator so far.</p>
  
  <pre><code>- (void)viewDidLoad
  {
  //...
  
      activity = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 32.0f, 32.0f)];
      [activity setCenter:CGPointMake(160.0f, 208.0f)];
      [activity setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleGray];
  
      [self.tableView addSubview:activity];
  
      [activity startAnimating];
  
      [activity performSelector:@selector(stopAnimating) withObject:nil afterDelay:1.0];
  
  
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>