+3  A: 

Try this:

    activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 32.0f, 32.0f)];
    [activityIndicator setCenter:CGPointMake(160.0f, 208.0f)];
    [activityIndicator setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleGray];
    [activityIndicator startAnimating];

Calling to setCenter should give the behavior you are expecting.

Good luck!

Pablo Santa Cruz
tried this. still getting it in the navbar. adding an image for reference
lostInTransit
+6  A: 

initWithFrame: is not the suggested method for creating a UIActivityInidcator. Taking a look at the API, you can see that to create a UIActivityIndicator, you should use

[[UIActivityIndicator alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];

Then add it to your view and set its position with setCenter: as suggested by Pablo.

Also, adding it to a location in a table view will make it scroll with the table if the user scrolls up or down. If you put it in the table's superview instead, it will stay in place.

Ed Marty
initWithFrame can be used to initialize any control.
lostInTransit
Yes, that's why it's there. But it is not the suggested method for certain controls where another initWith...: is supplied
Ed Marty