iOS Object-Oriented Objective-C Diving Deeper - Classes, Properties and Methods Methods in Practice

What is `self`? I'm having a hard time wrapping my head around it

Where is the "click below" part to get more information about self?

2 Answers

Nathan Barnes
Nathan Barnes
Pro Student 13,996 Points

Remember that the 'self' keyword means the instance acting on itself, so when you create an object and call a method that uses the self keyword within its body, then the actions within that method will be applied to the object calling the method.

Hope that clears it up.

Akash Sharma
Akash Sharma
Full Stack JavaScript Techdegree Student 14,147 Points

You can make multiple instances of the class like table2, table3 .. tableN. so for each tableN the class methods knows its talking about the table its calling the method from not just table3.