# Include <>: Used to reference a system file. The compiler searches for the file in the system file directory. # Include "xx. h": Used to reference User-Defined files. The Compiler first searches in the user directory, then installs the directory, and finally searches in the system directory. Note: Pay attention to repeated references when using include: class A and class B both reference class C. If class D References class A and class B, it will report an error of repeated references. # The import function is basically the same as the include function, but it avoids repeated references. So we basically use import in OC. @ Class tells the compiler that this class exists, but you do not need to tell the compiler how the class is implemented. if. the m file uses this class. m file summary import this class. In this case, why not import data directly in the header file? For example, class A references class B and class B references class C ...., class A, B, C... the header file has imported A lot of files, so if A is imported, the compiler needs to compile A large number of files and the Compilation Time will increase. Is @ class used in header files? Of course not. Sometimes # import is required. When should I use it? (1) If there is an inheritance relationship, use # import. For example, if B is A subclass of A, use # import when declaring A in B; (2) in addition, if A circular dependency such as A-> B, B-> A is mutually dependent, if # import is used in the header files of the two files to declare each other, then there will be a header file recycling error, then the @ class declaration in the header file will not make an error; (3) when there is a custom proxy, if you want to declare a proxy in the header file, for example, if @ interface SecondViewController: UIViewController is used when # import is not applied, an error occurs. Note that XXXXDelegate is custom.