Development
글수 89
MKMapView 를 사용할때, 현재 위치 표시를 다른 것으로 교체할 필요가 있는 경우가 있습니다.
이런 경우, 다음과 같은 방식으로 Delegate 메소드에서 처리하면 됩니다.
// 지도의 현재 위치 표시를 별도의 이미지로 교체한다.
-(MKAnnotationView *)mapView:(MKMapView *)mapview viewForAnnotation:(id<MKAnnotation>)annotation{
static NSString *AnnotationViewID = @"annotationViewID";
MKAnnotationView *annotationView = (MKAnnotationView *)[mapview dequeueReusableAnnotationViewWithIdentifier:AnnotationViewID];
if (annotationView == nil)
{
annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationViewID];
}
annotationView.image = [UIImage imageNamed:@"location_icon.png"];
annotationView.annotation = annotation;
return annotationView;
}
wholesale cheap nhl jerseys online - wholesale cheap nhl jerseys online
2013.05.20 22:36 (49.89.171.114)
cheap ray ban sunglasses,fake ray ban sunglasses,replica ray ban sunglasses - cheap ray ban sunglasses,fake ray ban sunglasses,replica ray ban sunglasses
2013.05.18 18:09 (113.195.169.93)
