我有这样的方法:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIButton *)control
{
UIStoryboard *Mystoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
CTObjectCreationVC *content = [Mystoryboard instantiateViewControllerWithIdentifier:TEST];
content.modalInPopover = YES;
content.contentSizeForViewInPopover = CGSizeMake(500, 300);
self.myPopoverController = [[UIPopoverController alloc] initWithContentViewController:content];
[self.myPopoverController presentPopoverFromRect:control.bounds inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown animated:YES];
}
我需要框架(MKAnnotationView *)view
来展示我的 Popover。但我有这样一个非常奇怪的框架:
MKPinAnnotationView: 0x1c600800; 帧 = (633571 327938; 32 39); 标签 = 3;
为什么?为什么 X 和 Y 很大?如何得到真实的 X 和 Y?谢谢
日志
2013-10-23 14:05:52.794 视图框架:MKPinAnnotationView:0x1f8c2160;帧 = (633548 328139; 32 39); 标签 = 17; 手势识别器 = NSArray: 0x1f8c2490>; 层=MKLayer:0x1f8c21c0>>可见:1 +55.68109131,+37.51455307