We can declare variables by using the property keyword in .h, but what is its scope? , you can also declare variables in the extended interface in .m. You can also declare variables in @implementation. What are their scopes? From the usage point of view, the variables declared by property in .h should be public, and the variables declared by @interface in .m should be protected. Is that so? Seek clarification.
1. The key in OC is to see if you have obtained the declaration of the variable. Once you have obtained it, it can be used. In effect, it is public in .h and private in .m. Generally, you will not import the .m file. The @interface in .m is actually an extension. It is just written in the .m file and will automatically provide the implementation of the settergetter.
2. Because of the existence of runtime, private is meaningless. I don’t think you should look at OC with this kind of thinking.