I am confused by something that I need some help with. I thought I did understand basic @property / @synthesize I have a custom ViewController class and I have following declaration in ,h file:
@property (nonatomic) NSMutableArray *milestoneViews;
Rather than using @synthesize, I tried to use my own getter and setter ...
So, I created following function in .m file -
-(NSMutableArray*) milestoneViews{
if (_milestoneViews == nil) {
_milestoneViews = [[NSMutableArray alloc]init];
}
return _milestoneViews;
}
It compiled fine. But when I started to write setter like this :
-(void) setMilestoneViews:(NSMutableArray*) array
{...}
I got the compilation error on all references to _milestoneViews.
What am I missing?