#import @interface FKFruit : NSObject @property(nonatomic, assign) double weight; @property(nonatomic, assign) int a; -(void) info; @end @implementation FKFruit -(void)info { NSLog(@"Fruit!!!, weight: %f, a: %d", _weight, self.a); } -(void)setA:(int)aa { _a = aa; //这样为什么正确 // self.a = aa; //这样为什么错误 } @end @interface FKApple : FKFruit @end @implementation FKApple -(void)info { [super info]; NSLog(@"Apple"); } @end int main (int argc, char * argv[]) { @autoreleasepool { FKApple * apple = [[FKApple alloc] init]; apple.weight = 100; apple.a = 1009; [apple info]; } } clang -fobjc-arc -framework Foundation propery.m