新しいXcode 4.2にアップグレードしたばかりで、plistのマップ注釈の読み込みに問題があります。私は定期的に更新するURLにplistを持っている必要があります。Xcode 4.2マップビューinitWithDictionary
私はXcodeの古いバージョンで問題はなかったが、今ARCのエラーを取得し、
Receiver type 'MapAnnotations' for instance message does not declare a method with selector 'initWithDictionary'.
ていますすべてのヘルプは大歓迎です。前もって感謝します。 Mapview.M
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Locations" ofType:@"plist"];
NSArray *array = [[NSArray alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.MyPlist.plist"]];
if (array) {
NSDictionary* myDict = [NSMutableDictionary dictionaryWithCapacity:[array count]];
for (NSDictionary* dict in array) {
MapAnnotations* annotation = [[MapAnnotations alloc]iniWithDictionary:dict];
[mapview addAnnotation:annotation];
}
NSLog(@"The count: %i", [myDict count]);
}
else {
NSLog(@"Plist does not exist");
}
ありがとうございます。それが私の問題でした。私はまだこのコードのすべてを頭の中に入れています。私はそれほど感謝しています! – Craig