メソッドを呼び出すときに、ビューを強制的に横向きにしたい。
メソッドが実行されると、次のように呼び出します。
[self shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)UIInterfaceOrientationLandscapeRight];
自動回転する方法
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
問題は、ビューが回転を強制しないことです。シミュレーターでテストすることは可能ですか、それとも実際のデバイスで動作しますか?