0

Possible Duplicate:
Objective C Static Class Level variables
Instance variable 'variable' accessed in class method error

I have:

+(NSString *)getUsernameString
{
    return usernameString;
}

usernameString is an NSString declared in the interface and as a property. I get the error instance variable 'usernameString' accessed in class method

What am I missing for this to work?

Community
  • 1
  • 1
Chris
  • 7,270
  • 19
  • 66
  • 110

1 Answers1

0

You declare it as static NSString *usernameString;

Ilanchezhian
  • 17,426
  • 1
  • 53
  • 55