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.
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.