Calling self in object c methods
2 answers
if you have a method called totalThemUpx: y:
then self is being used correctly. It might not be the best way to handle this situation as pointed out in the previous answers, but it is the correct way to reference yourself. However, it's worth noting that in your line of code, you have a space between "totalThemUp" and "x:" which doesn't actually work. A more appropriate method name would be, total: with:
or perhaps add: to:
because they read slightly better.
+1
a source to share