Hide instance variable from header file in Objective C

后端 未结 10 1063
梦如初夏
梦如初夏 2020-12-30 14:35

I came across a library written in Objective C (I only have the header file and the .a binary). In the header file, it is like this:

@interface MyClass : MyS         


        
10条回答
  •  太阳男子
    2020-12-30 15:03

    Two possibilities:

    1. It could be taking advantage of the modern runtime's ability to synthesize instance variables, as bbum suggested.
    2. The property might not have an underlying instance variable in that class. Properties do not necessarily have a one-to-one mapping with instance variables.

提交回复
热议问题