A quick question.
if I have a property and an ivar declared with the same name:
in the .h file:
(Reminder*)reminder;
@property(nonatomic,strong)(Reminder*)reminder;
in the .m file, should I use the ivar or the property in the init method if I'm using ARC?
- (id)initWithReminder:(Reminder*)reminder_ {
self = [super init];
if (self) {
reminder = reminder_;
}
return self;
}
Or should I use the property to get the benefit of the automatic reference counting like this:
- (id)initWithReminder:(Reminder*)reminder_ {
self = [super init];
if (self) {
self.reminder = reminder_;
}
return self;
}
I'm not sure at which point in the object's initialization the properties become accessible with the dot notation.
@synthesize
– nielsbot