When creating a class, a BOOL
property declaration often looks like this:
@property (nonatomic, getter=isActive) BOOL active;
For normal classes and subclasses, naming the getter is<#Key#>
makes sense, looks sharp, and is nice to use in if
statements.
What about when naming properties in a category though?
I was just implementing some helper methods on NSView
, when all of the sudden, things took a hideous turn:
@property (nonatomic, readonly, getter=bsd_isFieldEditorDelegate) BOOL bsd_fieldEditorDelegate;
After adding the recommended prefix (bsd_
in my case), the semantic value of the getter variation seems to get lost. In this case, should I just remove the getter name altogether or what?
I looked throughout the documentation, but I couldn't find a definitive answer. Is there one, or am I just overthinking it?