Skip to content

Commit 82d0af2

Browse files
committed
[objc] Update the Objective-C style guide 📜
Revision Date: 8/23/2017
1 parent de57aca commit 82d0af2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

objcguide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ example that should give you a feel for the style, spacing, naming, and so on.
2929
Here is an example header file, demonstrating the correct commenting and spacing
3030
for an `@interface` declaration.
3131

32-
Doxygen-style comments are encouraged for interfaces as they are parsed by Xcode
33-
to display formatted documentation. There is a wide variety of Doxygen commands;
34-
use them consistently within a project.
35-
3632
```objectivec
3733
// GOOD:
3834

@@ -90,7 +86,7 @@ An example source file, demonstrating the correct commenting and spacing for the
9086
#import "Shared/Util/Foo.h"
9187
9288
@implementation Foo {
93-
// The string used for displaying "hi".
89+
/** The string used for displaying "hi". */
9490
NSString *_string;
9591
}
9692
@@ -882,6 +878,10 @@ categories, protocol declarations, and enums.
882878
@end
883879
```
884880

881+
Doxygen-style comments are encouraged for interfaces as they are parsed by Xcode
882+
to display formatted documentation. There is a wide variety of Doxygen commands;
883+
use them consistently within a project.
884+
885885
If you have already described an interface in detail in the comments at the top
886886
of your file, feel free to simply state, "See comment at top of file for a
887887
complete description", but be sure to have some sort of comment.
@@ -1015,7 +1015,7 @@ Examples of strong and weak declarations:
10151015
IBOutlet NSButton *_okButton; // Normal NSControl; implicitly weak on Mac only
10161016

10171017
AnObjcObject *_doohickey; // My doohickey
1018-
MyObjcParent * __weak _parent; // To send messages back (owns this instance)
1018+
__weak MyObjcParent *_parent; // To send messages back (owns this instance)
10191019

10201020
// non-NSObject pointers...
10211021
CWackyCPPClass *_wacky; // Strong, some cross-platform object

0 commit comments

Comments
 (0)