I'm following along with a Lynda.com OCUnit testing tutorial that uses XCode 4. In one of the demos, it synthesizes properties in a Location.m file like this
#import "Location.h"
@implementation Location
@synthesize locationManager=locationManager_;
@synthesize speed=speed_;
The properties have a trailing underscore. In other tutorials I've followed (such as the Stanford iOS class), the synthesized properties usually are prefixed with an underscore for the instance variables.
When the properties are created in the .h
file, there are no underscores.
@property (nonatomic, strong) CLLocationManager *locationManager;
@property float speed;
Why the trailing underscore in the synthesize statement?