Accessing class method in objective c. Using self or classname?
问题 I am learning iOS programming and am confused by the following code regarding the use of keyword self. From my understanding, self is like Java's this . It refers to the current instance. When I want to call a class method, the usual way should be like [PlayingCard validSuits]; But it's also OK to invade a class method on an instance, right? Like [self validSuits]; (I am in the class so self refers to an instance of PlayingCard) But in the following code, it gives error somewhere but looks ok