Let's say that I jave this property:
I need to retain it only in the init method, because it's the only place where I assign it.How do I retain it then? I should write:
But this is a syntax error because there isn't any setter.How to allow the setter to operate only in the init method?
Code:
@property(nonatomic,strong,readonly) NSMutableArray* tags;
I need to retain it only in the init method, because it's the only place where I assign it.How do I retain it then? I should write:
Code:
self.tags=[NSMutableArray new];
But this is a syntax error because there isn't any setter.How to allow the setter to operate only in the init method?