I'm trying to find documentation on how I can override a property name in Objective-C with @synthesize. If I have an instance variable name of 'foo', I want to write it's accessor as 'bar'.
Doing something such as
@synthesize foo = bar;
gives a compile-time error.
I think you just have it backwards in your @synthesize. What you want is:
@synthesize bar = foo;
You can change the getter name when you declare the property (getter=bar).
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