最佳答案
What is the semantic difference between these 3 ways of using ivars and properties in Objective-C?
1.
@class MyOtherObject;
@interface MyObject {
}
@property (nonatomic, retain) MyOtherObject *otherObj;
2.
#import "MyOtherObject.h"
@interface MyObject {
MyOtherObject *otherObj;
}
@property (nonatomic, retain) MyOtherObject *otherObj;
3.
#import "MyOtherObject.h"
@interface MyObject {
MyOtherObject *otherObj;
}