ObjC category naming convention

learning some sample code from the iOS programming course (cs193p fall2010) that I came across the sbjson structure that extends NSObject, etc. by category SBJSON. but in the header + "NSObject + SBJSON.h" it reads like:

@interface NSObject (NSObject_SBJSON)

where does the magic mapping of NSObject_SBJSON to SBJSON come from? I noticed that xcode accepts any line before underscoring !?

but I haven’t found a hint anywhere.

Thanx klaus

+3
source share
3 answers

. Objective-C / . , - :

@interface NSObject (NSObject_SBJSON)

, NSObject ( ). "NSObject_SBJSON" , ( , ). "NSObject", @interface NSObject (SBJSON) .

+6

, , . Xcode () NSObject+SBJSON.h ; - Xcode Objective-C + .

, , .

+2

NSObject + SBJSON.h was changed / resolved in Xcode 4.2

0
source

All Articles