2011-01-27 13 views
1

通常、私のアプリケーションはポートレートモードですべてのビューをレポートビュー以外に表示します。レポートビューは、設定ビューを表示しているときにのみ表示され、デバイスを横向きに回転します。今度はデバイスをポートレートモードに戻すと、レポートビューは閉じられ、設定ビューが表示されます。ポートレートをビューコントローラの横向きポートレートモードに回転させます

In report view 

> shouldAutorotateToInterfaceOrientation 

return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||(interfaceOrientation == UIInterfaceOrientationLandscapeLeft)); 



Here at settings view 

    shouldAutorotateToInterfaceOrientation 


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

    Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]]; 
    [self.navigationController pushViewController:report animated:YES]; 
    [report release]; 

    } 
    return YES; 
    } 
+0

あなたは直面している正確な問題は何ですか?あなたは横長モードであなたのレポートビューを見ることができますか?はいの場合は、必要な次のステップについて説明してください。 –

+0

私はあなたがよく質問することを理解した場合にのみ、私はあなたを助けることができるでしょう。しかし、あなたは私にそれを適切な英語で説明することはできません。それはあなたの質問を変更しようとしました。ある意味で、私はあなたの質問を理解しました。変更された質問をもう一度読んで、私が物事を正しく解釈しているかどうかを教えてください。 –

+0

はい。あなたの編集は正しい – SOF

答えて

1

は、あなたが回転に対応することになっている場所である、... shouldRotateであなたのViewControllerを作成するのではなく、willRotateToInterfaceOrientation:duration:ではいけません。 shouldAutorotateToInterfaceOrientation:では、その向きに回転したい場合はYESを返します。あなたの場合は、すべての向き、またはPortraitUpsideDownを除くすべての向きにしたいように見えます。

willRotateToInterfaceOrientation:duration:では、必要に応じてビューコントローラーをプッシュまたはポップできます。

関連する問題