When I call
[[UIApplication sharedApplication] setStatusBarHidden:hideStatusBar];
on a iPad running an iPhone app on scaled mode, the status bar doesn't even hide. Instead, a 20 pixel black space gets pushed onto the top of my iPad views; ultimately getting my app rejected by apple even though I don't want anyone using this 'iPhone only' app on an iPad.
If I remove the setStatusBarHidden call, the iPhone obviously doesn't hide the status bar. On the iPad running scaled mode, the black bar doesn't show up anymore.
View controller-based status bar appearance is set to NO.
I have also tried the following:
- (BOOL)prefersStatusBarHidden
{
return hideStatusBar;
}
and this set before I need to hide the status bar.
hideStatusBar = YES; //changes
[self setNeedsStatusBarAppearanceUpdate];
However, "prefersStatusBarHidden" isn't called. I just need a solution so that the black bar doesn't appear on the iPad scaled mode and the status bar disappears on the actual iPhone.
I'm running this on iOS 8 and 9.