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 What is an Optional?

James Killeen
PLUS
James Killeen
Courses Plus Student 2,207 Points

Version 7.3. Hi All, I'm finding it very difficult to follow along with my version of Xcode 7.3

The tutorial version of Xcode has so many differences to it than the current version of 7.3. that I am struggling to even follow along in the videos. For example, the Swift Functions and Optionals video uses a culprit.toInt() which no longer exists and makes the whole video impossible to follow along with. I've searched other ways to initialise strings to integers, but can figure out in this case where to place this code.

1 Answer

Steven Deutsch
Steven Deutsch
21,046 Points

Hey James Killeen,

This is because of the update from Swift 1 to Swift 2.2. We are currently at Swift version 2.2. I recommend switching to the Swift 2 track. This is the latest Swift content on Treehouse. Theres a course on optionals there that will be easier to follow because of the updated syntax.

Good Luck