What is the standard Objective-C woll terminal convention?
I know this @property (nonatomic, getter=isWhatever) BOOL whatever;
is the standard way to declare properties BOOL
in Objective-C nowadays (see this question ).
But what is the preferred way to access this property? As far as I understand, for setter and non-setter properties BOOL
, dot notation is preferable to [someObject someProperty]
, but can't a redundant custom getter name do that?
I repeat, I am especially interested in what the agreement with the getter is: in my understanding self.whatever
, which would display [self isWhatever]
unused and getter=isWhatever
meaningless, which seems to be contradictory.
Is this an unintended side effect of the evolution of the language over time?
source to share
IMHO dot syntax should always be used for properties and parenthesis syntax for methods (you should NEVER refer to a property method (getter / setter method)) and "is" should prefix all BOOL properties (not just the getter). The correct syntax for your property would then be myObj.isWhatever.
source to share