How can I access instance variable in class method in Objective-C?

Viewed 17915

I am developing an application in which I implement a class method.h How can I access an instance variable in a class method?

Here is my instance method and an object is created of the class 'SomeClass':

-(void)viewDidLoad
{
   SomeClass *obj=[SomeClass alloc] init];
}

Here is the class method and in this method I am trying to access instance variable 'obj', so I got an error saying "instance variable 'obj' accessing in class method".

+(void)classMethodImplement
{

}
3 Answers
Related