Reputation: 10284
I'm not sure what it's called. Status bar? With the reception and batter life on. But is there an easy way to tell if it's displaying in an app?
I'm writing some generic code and I want something to be positioned right at the top of the screen if there isn't a bar, and below the bar if there is. People should be able to just dump my code into their project and it should just work. Thanks.
Upvotes: 0
Views: 340
Reputation: 11970
I believe if you put something with frame origin at (0, 0) it will take into account if status bar is visible or not - the views will be resized/pushed down using their autoresize masks.
Upvotes: 0
Reputation:
This should work:
BOOL hidden = [UIApplication sharedApplication].isStatusBarHidden;
And yes, it's called status bar.
Upvotes: 4