What is the difference between the code:
[[self label] setText:@"Hello"];
[label setText:@"Hello"];
Is it correct that they are basically the same if I call them from inside the class?
So if I call it from another class it will be:
[[someclass label] setText:@"Hello"];
someclass.label.text = @"Hello";
Is this correct? This self is disorientating me.
selfis a pointer to the object that’s had the method called on it.[label setText:]would presumably access the instance variable directly. The other ways all go through the accessor method.