Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an accepted convention for the order of @property declaration attributes?

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.

like image 658
sys 64738 Avatar asked Oct 31 '12 16:10

sys 64738


1 Answers

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).

like image 72
Jody Hagins Avatar answered Oct 12 '22 21:10

Jody Hagins