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

Charles Adams
Charles Adams
5,127 Points

I am a beginner trying to learn to code while using Swift and Xcode.

Good Evening Community, I am a beginner in coding and I am using swift. I got started out with a video from a friend on treehouse about learning to create a simple swift app. However, during the coding challenge area i got very confused because I have no idea what a class, inheritance or a struct is. Does anyone have a recommendation about where to start to get familiar with these coding languages and what they exactly mean? Thank you in Advance.

Ronnie Smith
Ronnie Smith
2,489 Points

Hi Charles, I'm a beginner as well and all I can say is what helps me is also doing some research through youtube as well as taking this course here on treehouse has helped me. A class is a blueprint where you can include variables and a function within it. Once you create that class you can call that class back with just the name you called it. So for instance if you wrote class fastCar { } so anything you write within the curly braces becomes the blueprint for that class. So then later in your script you can call the class again fastCar that will have everything you already need within it. The class itself will perform whatever you want it to do which is an instance. These instances are called objects that you created within the class. In a nutshell its just shorthand writing so you don't have to keep on writing the same thing over and over again which is what makes classes so attractive.

1 Answer

andren
andren
28,558 Points

If you are completely new to swift then I would recommend you start at the beginning of the Beginner iOS Development track. Tracks are collections of courses laid out in a recommended order.

If you already do know Swift basics and it's specifically classes, objects, and the like that you are unfamiliar with then you can skip some of the early courses and jump right into the Object-Oriented Swift 3 course. Which is where those topics are introduced.

I would mostly recommend you start at the first course though. As the subsequent courses assume you have completed them, and you might learn something else new that you have not learned before.

Charles Adams
Charles Adams
5,127 Points

Thank you, this is much appreciated.