With a single argument:
@synthesize directProp;
The synthesized getter/setter methods are called the same as the instance variable used to store the value. This can get confusing. For example:
self.directProp = YES;
[self setDirectProp:YES];
directProp = YES;
Are all valid.
With the additional = ivar
, you are able to name the instance variable (the convention being to use a leading underscore), which is a good idea, so you don't get confused:
@synthesize directProp = _directProp;
self.directProp = YES;
[self setDirectProp:YES];
_directProp = YES;
As also mentioned, with newer runtimes you don't need to declare the instance variable before use, which is also a bad idea and seems to be there to promote laziness. You will regret using this feature some day...