@interface first : <NSObject> {
NSString *myStr;
/**
I don't understand why declared this NSString *myStr.
Even if not declare NSString *myStr, this codes work well.
**/
}
@property (nonatomic, retain) NSString *myStr;
and Add @synthesize to first.m
它是正確的,我不需要申報myStr中作爲一個實例變量,如果我總是用myStr的性質,即self.myStr?爲什麼在@interface聲明對象當使用@property在Xcode中4
請改變你的問題的標題...... – 2011-04-06 19:51:03