Take this code :
@interface SomeClass:NSObject
{
@private
NSString* Size;
}
@property NSString* Size;
@end
--------------------------
@implementation SomeClass
@synthesize Size;
- (void) something
{
Size = @"syntax error : Expected identifier or '(' ";
self.Size = @"works ok";
}
@end
Why is this a syntax error? Is “Size” a reserved word or already defined in NSSObject ?
I’m getting the error on two separate projects…
Size is a type:
Dont use it, and you should follow the Objective-C conventions, which are to name the properties with lowerCase.