How to declare instance variables and methods not visible or usable outside of the class instance?

前端 未结 3 1337
情书的邮戳
情书的邮戳 2020-12-13 10:58

I\'ve looked through a bunch of posts on this subject. Maybe I didn\'t run across \"the one\" and someone will point me in that direction. The question is simple and proba

3条回答
  •  情话喂你
    2020-12-13 11:35

    You can use @private to specify that ivars are private. There is no way to make a method private, however. Even if the method is not listed in the header file, if someone knows the name and arguments they can call it.

提交回复
热议问题