私は簡単なiphoneアプリケーションを持っています。3つのビューがあります。最初のビューは、3つのボタンがあるポートレートビューです。2番目のビューには、縦向きでもあるテーブルビューがあります。最初のビューでは、ボタンをクリックすると2番目のビューが表示されます。2番目のビューでセルをクリックすると、3番目のビューが表示されます。しかし、3番目のビューは風景です。「pushViewController」を使用して各ビューからナビゲートしています。IBでビューを作成する場合、最初の2つのビューは縦向きで、3番目のビューは横向きです。3番目のviewcontrollerでは、次のコードも使用しています。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//return UIInterfaceOrientationIsLandscape(interfaceOrientation);
return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft));
}
最初の2つのビューを縦向きに、3番目のビューを横向きに表示するにはどうすればよいですか。