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
  • 63,052
  • 100
  • 273
  • 488

2 Answers2

1

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

Community
  • 1
  • 1
James Webster
  • 31,873
  • 11
  • 70
  • 114
0

self just means "the class you are in"

Gabriel
  • 3,039
  • 6
  • 34
  • 44