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 Basics (retired) Control Flow For-Condition-Increment

4 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

Hi Daniel,

This and other obsolete code is the reason you should not be taking this course! Instead, check out the Swift 2 course. Honestly, I don't understand why this course is still available... Pasan Premaratne any insight? I see questions like this pretty frequently.

Anjali Pasupathy
Anjali Pasupathy
28,883 Points

I took the Swift 2 track first, and then the Swift track. While quite a bit of what's in those videos is now obsolete, there's also a lot of material covered by that course that isn't yet covered by the Swift 2 courses. Before the Swift 2 closures course came out, I learned a lot about closures from the Swift Closures course. The Swift 2 Closures course that recently came out is, of course, more detailed and more useful, but most of what was in the Swift 2 Closures course I learned from the Swift Closures course. The Building a Weather App with Swift course was also incredibly useful. It covered information regarding networking and threads that is still relevant to Swift. It also covers working with Table Views. Until Network Programming with Swift 2 and Displaying Data with Table Views in Swift 2 come out, this course is the only course that covers those two topics in the Swift programming language. Not all the courses in the Swift track are obsolete.

Greg Kaleka
Greg Kaleka
39,021 Points

Thanks Anjali, that's good to know - I think the way you did it is probably best: Learn the basics with the most current syntax, then pick over the Swift 1 course for any holes yet to be filled by the Swift 2 material.

Anjali Pasupathy
Anjali Pasupathy
28,883 Points

Thanks! According to the library, Network Programming with Swift 2 and Displaying Data with Table Views in Swift 2 are coming out this month - unless I'm forgetting any courses, the Swift track will become obsolete after those courses come out.

Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

We're trying to come up with a way to elegantly archive this content. People who built apps with Swift 1 still use some of this content because it's relevant to their codebase even though Swift has moved on. If we archive right now, lots (thousands) of students who are using the content won't have access to it. We're actively working on getting the right features in place to solve this though.

Greg Kaleka
Greg Kaleka
39,021 Points

Makes sense Pasan. I think something like a banner encouraging folks to check out the Swift 2 courses could help avoid people accidentally starting off with Swift 1 now, which is obviously not desirable.

Daniel Conde
Daniel Conde
3,881 Points

Thanks Greg! It is unfortunate that this track is in the first row of my "Tracks" page meanwhile the swift 2 course is in the bottom row. I agree that this course should be archived or deleted.

Steven Deutsch
Steven Deutsch
21,046 Points

They're getting closer to catching the Swift 2.0 track up to the original Swift track, however, the Swift track was still a huge benefit to me. There were golden nuggets of information in the courses that were not discussed in their counterparts in the Swift 2.0 track. There's also the Stormy app which is the most advanced app you build on Treehouse with Swift.

Plus, problem solving for the changes in the syntax from Swift 1 to Swift 2 is a great learning experience in itself. It helped me better understand the Swift language and learn how to deal with things being deprecated as a developer.

Greg Kaleka
Greg Kaleka
39,021 Points

Point taken - thanks Steven!

Daniel Conde
Daniel Conde
3,881 Points

A good alternative lesson:

for i in (0..<todo.count) {
 print("item at index \(i): \(todo[i])")
}