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 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