What does -(XYPoint *) origin; mean
-
11-02-2021 - |
Question
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
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow