Search code examples
objective-c-2.0

What does -(XYPoint *) origin; mean


I am new to Objective-C and I am working hard to understand how it works. I get the basic idea with pointers, but this thing has me stumped:

-(XYPoint *) origin;

What does it mean when they add the * after the Class name inside of parenthesis?

Thanks.


Solution

  • This means that the method origin will return a pointer to an instance of XYPoint.