What's the meaning of static variables in an implementation of an interface?

后端 未结 4 1789
悲哀的现实
悲哀的现实 2020-12-04 09:37

I don\'t quite understand static variables when defined in the implementation of an interface. In methods I do understand how they differ from local variables, but not when

4条回答
  •  北海茫月
    2020-12-04 10:18

    From Apple's "The Objective-C Programming Language": "Declaring a variable static limits its scope to just the class -- and to just the part of the class that's implemented in the file. (Thus unlike instance variables, static variables cannot be inherited by, or directly manipulated by, subclasses)."

提交回复
热议问题