素朴な質問ですみません。
の内部にあるh file
が、クラススコープの外部@interface
にあるプロパティの定義を見た場合、それはどういう意味ですか?
@property (nonatomic, readonly) RMMapContents *mapContents;
コードは次のとおりです。
@class RootViewController;
@class RMMapContents;
@interface MapTestbedAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
//MAIN VIEW
//==============
RootViewController *rootViewController;
// NETWORK DATA
// =============
NSMutableArray *photoTitles; // Titles of images
NSMutableArray *photoSmallImageData; // Image data (thumbnail)
NSMutableArray *photoURLsLargeImage; // URL to larger image
NSMutableData *receivedData;
NSURLConnection *theConnection;
NSURLRequest *request;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet RootViewController *rootViewController;
@property (nonatomic, readonly) RMMapContents *mapContents;
@end
関数内に次の行が表示されます。
- (void)foo:(xyz *)abc{
..
RMMapContents *mapContents = [self mapContents];
..
}
それで、C++ から取得するとmapContents
、グローバル スコープの var ではないように見えますが (結局のところ、それがプロパティと呼ばれる理由ですよね?)、関数内で同じ名前を再度定義するのは少しおかしくありませんか?
誰かがここで少し明確にできることを願っています。
ありがとう!