Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Simple iPhone App with Swift Improving Our User Interface Adding a Pop of Color

Regina Soifer
Regina Soifer
7,386 Points

iOS 9 : application.setStatusBarStyle deprecated.

Just in case anyone had this issue in this video, there are 02 steps to fix this:

When Pasan goes into the info.plist file and sets

"View controller-based status bar(...)" to [NO]

+instead set it to [YES].

When Pasan changes the AppDelegate.swift

don't do it.

+instead, add this function to your ViewController.swift:

    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return UIStatusBarStyle.LightContent
    }

Hope this helps.

Jhoan Arango
Jhoan Arango
14,575 Points

Hey :

You can also set "View controller-based status bar(...) [YES]

and in your deployment window, you can set the status bar style to "light" as shown below.


alt text