I've declared a property someProperty and synthesized it:
@synthesize someProperty = _someProperty;
But when I call it in code, I get EXC_BAD_ACCESS in my getter overide method. Why??
- (NSString *) someProperty { <---EXC_BAD_ACCESS HERE
if(!self.someProperty)
return self.someOtherProperty;
return self.someProperty;
}
I think you might be getting a Stack Overflow! because the line
if(!self.someProperty)
will be calling
- (NSString *) someProperty
recursively until the recursion stack overflows.
Similarly if it could get to the return line, it would do the same thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With