実際のデバイス(iPhone 3G、3.1.3)でアプリをテストすると、画像に問題が表示されます。シミュレーター(iOS 4.1SDKを使用したxcode3)では問題ありません。申し訳ありませんが、まだ画像を投稿できません。これが私の最初の質問です。
http://i.stack.imgur.com/Ct4on.jpg
アノテーションの実装には次のコードがあります。
- (id)initWithLocation:(CLLocationCoordinate2D)coord {
self = [super init];
if (self) {
coordinate = coord;
}
return self;
}
そしてこれはヘッダーファイルの一部です:
@interface MyAnnotation : NSObject <MKAnnotation>
そして、これは私が新しいものを作成する場所です(ループ内):
MyAnnotation *theAnnotation = [[MyAnnotation alloc] initWithLocation:theCoordinate];
theAnnotation.title = [single objectForKey:@"address"];
theAnnotation.objID = [single objectForKey:@"id"];
[self.mapView addAnnotation:theAnnotation];
[theAnnotation release];
これについて何かアイデアはありますか?何を見たらいいのかわからない:/