I understand that when accessing setter / getter methods for properties I should be using [self setThisValue:@"a"];
rather than thisValue = @"a";
However with the example below I can see that adding self documents that I am sending a message to an iVar property rather than a locally scoped variable, but does it do anything else in this case?
@interface CustomController : UIViewController {
NSMutableArray *foundList;
}
@property(nonatomic, retain) NSMutableArray *foundList;
@end
.
[[self foundList] addObject:eachObject]; // I usually write this ...
OR
[foundList addObject:eachObject];
gary.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…