Answer

// Create the instance

UIActivityIndicatorView  *indicator = [[[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];

// indicator.frame=CGRectMake(240, 160, 25, 25); // some location

indicator.frame = CGRectMake(round((self.view.frame.size.width - 25) / 2), round((self.view.frame.size.height - 25) / 2), 25, 25);

[self.view addSubview:indicator];

[indicator startAnimating]

.... Code to do a task like downloading image/page etc.

// remove it
[indicator removeFromSuperview];