Ray's playground

 

More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)

  You can put four directives in front of your instance variables when they are declared in the interface section, to more precisely control their scope:
  @protected—Methods defined in the class and any subclasses can directly access the instance variables that follow.This is the default case.
  @private—Methods defined in the class can directly access the instance variables that follow, but subclasses cannot.
  @public—Methods defined in the class and any other classes or modules can directly access the instance variables that follow.
  @package—For 64-bit images, the instance variable can be accessed anywhere within the image that implements the class.

 

posted on 2010-10-18 20:40  Ray Z  阅读(184)  评论(0编辑  收藏  举报

导航