Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Functions and Optionals Optionals Exercise: isDivisible function

Michael Flores
Michael Flores
2,174 Points

Xcode gives an error that "#" is no longer used in Swift. This video/course needs to be updated.

Swift no longer uses # as a shorthand for an external name that is identical to the local name, they must now be doubled up. i.e. func isDivisible(number number: Int) -> Bool? { } https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html#//apple_ref/doc/uid/TP40014097-CH10-ID158

1 Answer

Michael Flores
Michael Flores
2,174 Points

Then they really need to update the track this is in to make it clear that it's now out of date.

Ruggiero A
Ruggiero A
8,534 Points

I'm surprised to see how much troubles can iOS SDK create. When I did Android Track, even projects which were made with Eclipse were fine on Android Studio IDE.

Though the track can still be followed with some tweaking. I'm watching this because I want to see how Swift was before switch to 2.0