3

Is it feasible to hide the status bar in iOS 7 without erasing the space completely? I want to create my app's launch images, and just want to create the empty image with navigation bar and tabbar being set and status bar hidden. However, when I wrote out the following values in my .plist file to hide the status bar,

<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

, the status bar is hidden but the navigation bar is "pushed out" to the top of the screen, and hence the overlapped gray sheet on the top is now 44 px, not 64 px (44 + 20).

I also tried to change the height of the navigation bar, but found out that it cannot be modified and highly recommended to always use default values that Apple have developers to use.

So how can I fix up the issue?

Blaszard
  • 30,954
  • 51
  • 153
  • 233
  • Is this just for the screenshot? Why not just use Photoshop or similar and replace the text with a color? – Léo Natan Mar 13 '14 at 19:29
  • I agree with @LeoNatan - it is a lot easier to manipulate the screenshot than to change the layout details. – matt Mar 13 '14 at 19:32
  • I don't have any skills in design app such as Photoshop or Pixelmator and would like to have it done within Xcode/Objective-C. – Blaszard Mar 13 '14 at 19:32
  • If you don't want to manually edit the image, there are apps available on the Mac App Store to crop or clean up the status bar area of iOS app screen shots. – Mike Mertsock Mar 13 '14 at 19:38
  • esker, what's app are you talking about? Anyway, I might decide to leave those redundant texts there and hope it isn't exposed to the rejection by Apple, or remove the status bar there and use 40px navigation bar. Thanks guys for the help though. – Blaszard Mar 13 '14 at 20:29

2 Answers2

1

Use the below code :

- (UIStatusBarStyle)preferredStatusBarStyle
{
      return UIStatusBarStyleLightContent;
}
Raj
  • 413
  • 1
  • 4
  • 5
0

What you can do is make a UIView whose width is the screen size and height is 20px giving it a background color. Hope this will do the trick!

Something like this which can be modified as per your requirement Adding view on StatusBar in iPhone

Community
  • 1
  • 1
Harsh
  • 2,852
  • 1
  • 13
  • 27