Reputation: 382
I have a specific edge case I'm trying to account for - the situation in which the status bar is already visible before even loading the app. My following code in my AppDelegate does not account for this situation (it only accounts for when the status bar is changed):
- (void) application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame
{
self.currentStatusBarFrame = newStatusBarFrame;
[[NSNotificationCenter defaultCenter] postNotificationName:@"Status Bar Frame Change"
object:self
userInfo:@{@"current status bar frame": [NSValue valueWithCGRect:newStatusBarFrame]}];
}
Does anyone know of a similar function that would check if the status bar is already visible? I can't seem to find an answer for this anywhere.
Upvotes: 0
Views: 204
Reputation: 15331
Click on your project in the file navigator see section deployment info -> see status bar style -> check hide status bar. Or add Status Bar Initially Hide true in your app's plist does the same thing.
Upvotes: 1