0
我顯示在地圖視圖中的酥料餅如下:酥料餅框架問題
但是,當我旋轉設備,它顯示喜歡:
如您會看到它覆蓋了註釋,而不是顯示在註釋旁邊。
我的代碼如下所示:
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];
幫我解決這個問題。