1, @class: declaration is a class
When we actually use the class, import the class using import
2, the following code will be an error, because import can not reference each other, this is just a @class declaration class can
#import "B.h"
@interface A:nsobject
@end
#import "A.h"
@interfact B:nsobject
@end
3, if you are inheriting a class, you should import the header file of the class,
If you are simply defining member variables, attributes, and using the @class
4. There are two ways to introduce classes
#import: Contains all the information about a class, including variables, methods, which can degrade the performance of the compilation
@class: Just tell the compiler that this is a class that declares a class.
5, @class only need to know the name of the referenced class can be. In the implementation class, because you want to use the entity variables and methods in the referenced class, all of the. m files need to use #import to contain the header file of the referenced class.
If hundreds of headers are #import the same file, or if the files are #import at once, all classes that are referenced to this file will need to be changed once the first file is burned.
6. For dependencies, for example, a class-dependent b,b relies on a #import就会报编译错误