I’m just trying to get my head around this type of syntax
I know that the
[instanceOfClass Method];
eg. [myImage setImage:[NSImage imageNamed:@"picture.jpg"]];
performs a method on the instance of the class.
but how does this work..
Variable = [Class methodName];
eg. int Value = [sender intValue];
can someone explain this to me. I get that the first example performs a method on instance of class, class or variable..
but how does the latter part work?
Thank you very much.
The second example also performs a method on an instance of a class, but that method returns a value which is assigned to the value on the left side of the equation.
I’d recommend spending a little time reading the introduction provided by Apple. This specific question is discussed in this part of the document: