What does "+" mean in Objective-C files

I read some Obj-C projects and I always find this standard for file naming:

ClassName+OtherClassName.h 

What does it mean? Commonly used with the base class used on the left side and another class used on the right side, for example:

 NSString+URLEncoding.h 

Thanks in advance.

+4
source share
2 answers

The way I used it is a way to organize categories that are added to classes. Each category is assigned its own title and source file. "+" is just another character in the file name, although it is often not used. More about categories here .

+6
source

This is a naming convention, nothing more. In this case, for the category on NSString , something will be implemented that needs to be done with the URL encoding.

+1
source

Source: https://habr.com/ru/post/1310294/


All Articles