I tend to declare my property attributes in this order: Writability, Setter Semantics, Atomicity
For example:
@property (readwrite, strong, nonatomic) NSString *foo;
I'm just wondering if there's a generally-accepted convention among Objective-C developers? Apple's docs seem to be silent on this.
No.
You will see code, even from Apple, with them declared in different orders. It makes no difference to the compiler, and since there are not a ton of them, it does not necessarily make the code any easier to read either.
Use whatever convention you like (including no-convention).
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