如何知道自己点击的大头针按钮是哪一个
UIButton *btn=[UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[btn setFrame:CGRectMake(0, 0, 20, 20)];
[btn addTarget:self action:@selector(countup:) forControlEvents:UIControlEventTouchUpInside];
anniView.rightCalloutAccessoryView=btn;
我做的是基于MapKit的应用,在地图里加上了很多大头针,然后点击大头针再打头阵的上面出现了一个注视图,在右边自己定义了一个按钮,点击按钮后,请问如何知道自己点击的按钮是哪一个
-(void)countup:(UIApplication *)application{
UIAlertView *alertstart = [[UIAlertView alloc]
initWithTitle:@"车站"//self.station.name
message:@"距离"
delegate:nil
cancelButtonTitle:@"back"
otherButtonTitles:nil];
[alertstart show];