This will put the indicator in the center of your view (and not on the screen!):
activityIndicator.center = CGPointMake(self.view.bounds.size.width / 2.0f, self.view.bounds.size.height / 2.0f);
activityIndicator.autoresizingMask = (UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin)
Auto-resistance is maintained in the center when its size changes (for example, when switching the screen orientation).
If this does not work, your problem is somewhere else. Try to write down the size of your view, is it possible that it is located incorrectly?
NSLog(@"View frame: %@", NSStringFromCGRect(self.view.frame));
source
share