Can anyone please explain me what does @class declaration do in Objective-C and what are the cases in which we should use this declaration?
it is called a forward declaration.
you use this directive to tell the compiler that there is an objc class with the name specified. your other options are to include the interface, or use id for variables or types.
this is helpful to minimize dependencies. i use them whenever i can to minimize dependencies, and significantly reduce build times.
it's the same as in c and c++:
struct mon_struct;
namespace MON { class mon_class; }