質問

私は detail view を持っています。ここで、ボタンでヘルプビューをロードします。[UIViewController presentModalViewController:animated:]を使用しています。 ヘルプビュー私はボタンでビューを閉じています。[UIViewController dismissModalViewControllerAnimated:]を使用しています。

問題は、ヘルプビューを閉じた後、デバイスがどの向きにあるかに関係なく、 detail view は縦モードにあります。

すべてのビューコントローラでは、shouldAutoRotateToInterfaceOrientation:を実装してYESを返しました。

役に立ちましたか?

解決

2つの選択解決策があると思います

1. IOS 5.0以降では、で、を実装することができます。

/* call this method when your return value from shouldAutorotateToInterfaceOrientation: changes
 if the current interface orientation does not match the current device orientation, a rotation may occur provided all relevant view controllers now return YES from shouldAutorotateToInterfaceOrientation: */

+ (void)attemptRotationToDeviceOrientation
.

関連項目: http://developer.apple.com/library/ios/#documentation/uikit/Reference/uiviewController_class/Reference/Reference.html

2。からのトリックを使用します。iOS 4.3以前のではかなり大丈夫ですが、オーナーの答えが警告した保証ソリューションではありません。

それがあなたを助けることを願っています!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top