私はグーグルマップにいくつかの注釈を持っています、私はボタンセレクターでそれらの緯度と経度の値を別の数学に送信する必要があります、私は「タグ」に設定しようとしましたが、それは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;
事前にThnks