I am working on a ARC based project. I am just wondering what is the main use of self ?
I am having an array as follows
@property(strong,nonatomic)NSMutable *dataArray;
I am initializing the array as follows
-(void)viewDidLoad{
self.dataArray=[[NSMutableArray alloc]initWithObjects:@"one",@"two",nil]; //first method
}
or
-(void)viewDidLoad{
dataArray=[[NSMutableArray alloc]initWithObjects:@"one",@"two",nil]; //second method
}
Can anyone tell me what is the difference between my first and second method ?