Possible Duplicate:
How does an underscore in front of a variable in a cocoa objective-c class work?
Difference between self.ivar and ivar?
Synthesized property and variable with underscore prefix: what does this mean?
To use property in object c, I have two choices, which one should i use?
choice1: self.property = xxxx;
choice2: _property = xxx
For example:
//.h file
@interface ViewController : UIViewController
@property (retain, nonatomic) NSArray *myArray;
@end
//.m file
@interfaceViewController ()
@end
@implementation ViewController
- (void)doing {
_myArray = [[NSArray alloc] init]; //choice one
self.myArray = [[NSArray alloc] init]; //choice two
}
@end