2

Possible Duplicate:
“Invalid use of 'this' in non-member function” in objective-c context?

If I use the keyword self inside a class method:

+ (id) myMetho
{
   self ...
}

Does it refer to the class or to the current instance ?

Community
  • 1
  • 1
aneuryzm
  • 59,888
  • 97
  • 265
  • 479

2 Answers2

1

In short, it represents the class. For a longer answer, have a look here

Community
  • 1
  • 1
James Webster
  • 31,482
  • 11
  • 68
  • 114
0

self just means "the class you are in"

Gabriel
  • 3,001
  • 6
  • 33
  • 44