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];

この問題を解決するのを手伝ってください。

4

1 に答える 1