成员变量应该是 @private

Tip

成员变量应该声明为 @private

  1. @interface MyClass : NSObject {
  2. @private
  3. id myInstanceVariable_;
  4. }
  5. // public accessors, setter takes ownership
  6. - (id)myInstanceVariable;
  7. - (void)setMyInstanceVariable:(id)theVar;
  8. @end