【发布时间】:2013-01-17 13:28:36
【问题描述】:
我在地图视图中显示如下弹出框:
但是当我旋转设备时,它显示为:
如您所见,它覆盖了注释,而不是仅显示在注释旁边。
我的代码如下图:
CGPoint annotationPoint = [mapView convertCoordinate:aView.annotation.coordinate toPointToView:mapView];
float boxDY=annotationPoint.y;
float boxDX=annotationPoint.x;
CGRect box = CGRectMake(boxDX,boxDY,5,5);
UILabel *displayLabel = [[UILabel alloc] initWithFrame:box];
[popView presentPopoverFromRect:displayLabel.frame inView:mapView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[displayLabel release];
帮我解决这个问题。
【问题讨论】:
标签: ios xcode ipad mkmapview uipopovercontroller