Status bar not showing up on iOS app

10,122

Solution 1

One other thing you can try is to click on the name of your project. Then click on the name of your project under Targets. Then under where it says Deployment Info take a look at where it says Status Bar Style and change it to Light. Do a Shift+Cmd+K to clean and then run.

Solution 2

The perfect and working way to make StatusBar LightContent.

1) Go to "info.plist" and add property View controller-based status bar appearance = NO

2) In your AppDelgate.swift, put this code:

application.setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true)

Hope this helps!

UPDATE : for iOS 9, Swift 4 :

UIApplication.shared.statusBarStyle = .lightContent
Share:
10,122
Dallas
Author by

Dallas

Currently a student and iOS Developer at an insurance company.

Updated on June 18, 2022

Comments

  • Dallas
    Dallas almost 2 years

    I am having a problem getting the status bar to show up in my view on iOS. I have tried changing the plist file of "Status Bar is Initially Hidden" to NO but it still doesn't show up.This black bar is all I get and I am unsure why. enter image description here

    EDIT: I am unsure why i got down voted, I did research this and everything I've tried has not worked, maybe i should be more specific. Ive tried both the answers below, resulting in an error. Is there something i am missing with delegation or something similar. I am new to swift and have issues with delegations.