2011-09-13 7 views
2

私は、iPad上にViewController1を持っています。これは、presentModalViewCotrollerを使用して別のViewController2を使用します。親ビューコントローラのインターフェイスの向きを変更する

UIViewController* viewController2 = [[VideosViewController alloc] init]; 
viewController2.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
self.modalPresentationStyle = UIModalPresentationCurrentContext; 
[self presentModalViewController:viewController2 animated:YES]; 
[viewController2 release]; 

しかし、ViewController2には半透明な部分があります。したがって、ViewController 2が既に画面に表示されている場合、デバイスを90度回転させると、ViewController2のインタフェース方向は適切に変更されますが、Viewcontroller1の向きは変更されません。私は、ViewController1とViewController2のインタフェースの向きを変更したい。助言がありますか?事前

+0

こんにちは、これはうまくいきましたか?あなたがそれを手に入れたらどうすればいいか教えてください。 – Mohan

+0

@モハンはこの質問に私の答えを見てください。それが役に立てば幸い。 – archeopetrix

答えて

0

おかげで私は私が達成しようとしていたセミ半透明のシートを形成するために、とにかく似ていたので、私は単にviewController2にUIModalPresentationFormSheet modalPresentationStyleを使用した場合、それははるかに優れたであろうことに気づきました。これは、フォームシートとして表示されたviewController2も、まだ表示されているプレゼンテーションviewController1をバックグラウンドで回転させるということです。

関連する問題