MKMapViewに現在の位置が表示されるように設定しました。私はまた、他のピンのために実装されたカスタムピンを持っています。しかし、現在の場所がカスタムピンとして表示されているのに対し、私はそれが通常の青い円(Googleマップのようなもの)になりたいと思っていました。MKMapView現在の位置がカスタムピンとして表示されます
私は自分のコードに次のように定義されています
- (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation: (id<MKAnnotation>) annotation MKAnnotationView *pin = (MKAnnotationView *) [self.mapView dequeueReusableAnnotationViewWithIdentifier: @"VoteSpotPin"];
if (pin == nil)
{
pin = [[[MKAnnotationView alloc] initWithAnnotation: annotation reuseIdentifier: @"TestPin"] autorelease];
}
else
{
pin.annotation = annotation;
}
[pin setImage:[UIImage imageNamed:@"TestPin.png"]];
pin.canShowCallout = YES;
pin.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
return pin;
}
は、どのように私はピンとして表示するために現在の場所を防ぐことができますか?
mapView.showsUserLocation = YES、それは現在の場所が表示されます。 – Srinivas
私はそれをして、それは私が持っているカスタムピンとして現在の場所を示し、青い円ではありません。それは実際には実際の問題 – adit
あなたのアプリケーションをチェックしているかどうかは、デバイスまたはシミュレータ – Srinivas