正如您在下面看到的,我有一个注释视图,它有一个右键。当用户点击右键时,我正在呈现弹出窗口 - 问题是我不知道用户点击的位置,因此我没有X和Y来相应地显示弹出窗口。如何跟踪右侧标注附件视图的位置
如何找出用户点击哪里,即X和Y?
HotelAnnotationView *customPinView = [[HotelAnnotationView alloc] initWithAnnotation:theHotel reuseIdentifier:hotelPin];
//The right button which allows user to see hotel information
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[rightButton addTarget:self action:@selector(showDetailsForHotel:) forControlEvents:UIControlEventTouchUpInside];
rightButton.tag = theHotel.id;
customPinView.rightCalloutAccessoryView = rightButton;