I am working my way through some Objective-C code that I did not write and have found a variable declaration style that I am unfamiliar with. Can anyone tell me the scope of the variable 'myVar' in the class implementation below? Note that this appears in the '.m' file and not the interface declaration.
@implementation MyClass
@synthesize ivar1, ivar2;
NSString* myVar; // <- What is the intent?
- (id)init {
...
@end
To me the intention appears to be similar to that of a member variable. What are the advantages of declaring a variable in this way instead of using an ivar in the @interface declaration?