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

I tend to declare my property attributes in the following order: Writability, Setter Semantics, Atomicity

For example:

@property (readwrite, strong, nonatomic) NSString *foo; 

I'm just wondering if there is a common convention among Objective-C developers? Apple docs seem to be silent about this.

+7
source share
1 answer

Not.

You will see a code, even from Apple, with an announcement in different orders. This has nothing to do with the compiler, and since there are not many, it does not necessarily make the code easier to read.

Use any agreement that you like (including without agreement).

+4
source

All Articles