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 Weather App with Swift (Retired) Displaying Our Weather Data Creating the User Interface

"application.setStatusBarHidden(TRUE, withAnimation: .None)" Not working

When I use:

application.setStatusBarHidden(TRUE, withAnimation: .None)

I get this error.

Stormy/AppDelegate.swift:20:21: Could not find member 'None'

I have read the documentation on Apple's Developer page, without much success.

2 Answers

Found the answer myself.

TRUE in the statement must be lowercase:

application.setStatusBarHidden(true, withAnimation: .None)
David Miller
David Miller
3,453 Points

I came across the same issue. It was referenced as a bug where the system would automatically correct to capitilized TRUE. (http://stackoverflow.com/questions/26476444/why-does-xcode-6-keep-autocompleting-true-as-true-from-the-dynamic-link-editor-l)

To get by the bug. I followed the advise from link above. Copied the bool true from the return statement and past into the location where true was needed.

application.setStatusBarHidden(true, withAnimation: .None) return true