Properties for Class and Its Subclasses Only

后端 未结 4 1420
无人共我
无人共我 2020-12-15 18:29

Is it possible to define properties that are only available to the class they are defined in, and that class\'s subclasses?

Stated another way, is there a way to def

4条回答
  •  余生分开走
    2020-12-15 19:13

    You could use such syntax in subclass implementation.

    @interface SuperClass (Internal)
    
    @property (retain, nonatomic) NSString *protectedString;
    
    @end
    

提交回复
热议问题