このコードを使用して、iOS アプリケーションのランドスケープ モードをロックしています。
#pragma mark Orientation handling
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationMaskAllButUpsideDown);
}
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
}
iPhoneでは正常に動作していますが、iPadでは正しく動作していません。ランドスケープ モードをロックしません。
これに関するガイダンスが必要です。