質問

What is the best way to show a UIViewController only when the device is on landscape mode? The modal view controller should present itself modally when the device is on landscape mode and should dismiss itself when going back to portrait.

Since - (BOOL)shouldAutorotateToInterfaceOrientation :(UIInterfaceOrientation)toInterfaceOrientation is only called once (and not for every UIViewController), how should the navigation controller be set up?

役に立ちましたか?

解決

The method you're looking for is

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)o duration:(NSTimeInterval)t;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top