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

How would you use Dot Notation?

What is the purpose of dot notation and where would you use it. How can it simplify thing's. Like referencing self.title, as an example.

2 Answers

Cameryn,

One simple translation: self.title '=' title property of the self object (the object you are currently dealing with). A way to think about it is that the title variable is packaged into a 'container' called an object -- so it's not flying around on its own. But this is very simplistic.

I recommend you take a look at object-oriented programming in a more broad sense. It is a tough concept to digest, and so if you find it overwhelming, I suggest you just roll with this code as it is for a while. It will become clear as you build more.

Enjoy, Peter

Ok thanks, my bad for being too broad.