这个问题在这里已经有了答案:
Best Answer-推荐答案 strong>
试试这个
-(MKAnnotationView *)mapViewMKMapView *)mV viewForAnnotationid <MKAnnotation>)annotation
{
if([annotation isKindOfClass: [MKUserLocation class]])
return nil;
MKPinAnnotationView *pinView = nil;
static NSString *defaultPinID = @"lace to be";
pinView = (MKPinAnnotationView *)[self.myMapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
if ( pinView == nil ) pinView = [[MKPinAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:defaultPinID];
pinView.pinColor = MKPinAnnotationColorRed;
pinView.canShowCallout = YES;
pinView.animatesDrop = YES;
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton addTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
pinView.rightCalloutAccessoryView = rightButton;
return pinView;
}
关于ios - 注释引脚作为用户位置,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/15317376/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) |
Powered by Discuz! X3.4 |