I'm having a strange error when trying to override the setter
and getter
of a property.
On my header file I've defined the following property:
@property (strong, nonatomic) NSDate *startedOn;
On the implementation, I have this setter
:
- (NSDate *)startedOn {
if (!_startedOn) {
[self updateStartedOn];
}
return _startedOn;
}
Everything is working as it should at this point, but, when I try to override the setter
like this:
- (void)setStartedOn:(NSDate *)startedOn {
_startedOn = startedOn;
}
I get the following error:
This doesn't make any sense to me, what I've checked:
- The setter nor getter have any duplicated definition
- The parent class doesn't have any duplicated definition
- None of the class's categories have any duplicated definition
Does any one have a clue of what I'm doing wrong? Thanks.