Hi,
In Objective-c the default getter of the property is it's name.
if the property name is "string" then the default setter is setString.
can i define a general getter/setter for all of the properties of a class?
for example:
class: Person.
properties: NSString *ID, *name, *address.
i want all the getter methods (ID, name, address) to return the NSString with a prefix of "A".
the method ID will return @"AID".
the method name will return @"Aname".
the method address will return @"Aaddress".
i do not want to override each getter separately because i have a lot of properties.
Thanks.
In Objective-c the default getter of the property is it's name.
if the property name is "string" then the default setter is setString.
can i define a general getter/setter for all of the properties of a class?
for example:
class: Person.
properties: NSString *ID, *name, *address.
i want all the getter methods (ID, name, address) to return the NSString with a prefix of "A".
the method ID will return @"AID".
the method name will return @"Aname".
the method address will return @"Aaddress".
i do not want to override each getter separately because i have a lot of properties.
Thanks.