This @interface section for the class extension (extension).
It was designed to solve two problems.
One is where you define a private method of the class.
Second, the property of public readonly,private ReadWrite is implemented (meaning to define an attribute in H header file is ReadOnly, but in the inside of the class it is desirable to read and write, So you can redefine this property as ReadWrite in the @interface section of the M source file, at which point this property is read-only externally and read-write internally.
In addition, variables and attributes can be declared in this section, but declared variables, properties and methods are private and can only be accessed by the current class, which is equivalent to private.
If you have the concept of public and private, you can understand that:. h file declaration of the @property, is common, can be accessed by other. m files, whereas the @property declared in the. m file is private and can only be used in the. m file.
It is easy to understand further.
Because. h files can be #import by other. m files. Nature can be accessed by other. m files, and in the. m file is actually a static variable or method that cannot be accessed by other files.