区别类的扩展
@interface MyClass : NSObject
- (float)value;
@end
@interface MyClass () { //注意此处:扩展
float value;
}
- (void)setValue:(float)newValue;
@end
@implementation MyClass
- (float)value {
return value;
}
- (void)setValue:(float)newValue {
value = newValue;
}
@end