我在google地图上有一些anotation,我必须在按钮选择上发送那些纬度和经度值到另一个mathod,我试图在“tag”中设置但是它返回null值,任何想法为什么
NSString *str = [NSString stringWithFormat:@"%f, %f", annotation.coordinate.latitude, annotation.coordinate.longitude];
// NSLog(@"%@",str);
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
rightButton.frame = CGRectMake(30, 0, 32, 32);
[rightButton setImage:[UIImage imageNamed:@"getdirections.png"] forState:UIControlStateNormal];
[rightButton setTitle:annotation.title forState:UIControlStateNormal];
[rightButton addTarget:self action:@selector(showDetails:) forControlEvents:UIControlEventTouchUpInside];
annotationView.rightCalloutAccessoryView = rightButton;
return annotationView;
事先提前