2011-06-22 12 views
0

横向きのipadアプリケーション(NavigationViewControllerを使用)があります。私は問題なくhierachary私のビューをナビゲートすることができ、画面が正常に表示されます。 画面上のテーブルが展開され、画面の正しい比率が使用されます。私は、ナビゲーションバーの[戻る]ボタンを押すと、それは、テーブルのと、前の表示に戻ったときに適用一切横向きのIpadは、ビューに戻るときに自動サイズ変更マスクを適用しません。

table.autoresizingMask = UIViewAutoresizingFlexibleWidth; 

がない場合、テーブルの実際の寸法に戻ってしまっているようです。

これは、後方にナビゲートする場合にのみ発生します。私はこれを引き起こすとは思わないので、OSからいくつかのバグがありますか?

多くのおかげで、 -codeは

答えて

0

あなたもviewWillAppearでサイズの変更を適用する必要があります。それと一緒にテーブルをリロードします。

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; 


    if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) { 

     [Table reloadData]; 
     // Set coordinates of views to have to change in landscape mode 
    } 
    else if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { 
     [Table reloadData]; 
     // Set coordinates of views to have to change in potrait mode 

    } 
関連する問題