views:

58

answers:

2

Hey all,

I've been reading some Obj-C projects, and I'm always finding this standard for naming files:

ClassName+OtherClassName.h

What does this mean? Normally is used with a base class used on the left side, and another class used on the right side, like:

NSString+URLEncoding.h

Thanks in advance.

+1  A: 

It's a naming convention, nothing more. In that case, it would be for a category on NSString that implements something to do with URL encoding.

Jeff Kelley
+6  A: 

The way I have seen it used is as a way of organizing categories, which are code extensions added to classes. Each category is given its own header and source file. The '+' is simply another character in the file name, though it is not often used. You can read more about categories here.

fbrereto