“Invalid use of 'this' in non-member function” in objective-c context?
问题 Using Xcode. In this code (func is declared in interface), tells subj error, standing on string with 'self'. + (void) run: (Action) action after: (int) seconds { [self run:action after:seconds repeat:NO]; } What the... ? 回答1: self is an instance variable used to refer to an instance of the current object. You are attempting to use it in a class level method +(void)... where self has no meaning. Try using a shared instance, or passing an instance of the class in question to the method. + (void