私はiPadのTabBarApplicationを持っています。TabbarControllerをサブクラス化して、アプリケーションが向きの変更に反応するようにしました。
@implementation frankenlandTabBarController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (
interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight
);
}
@end
問題は、タブバラップのすべてのビューコントローラーをこの向きにしたくないということです。
単一のコントローラーでメソッドを上書きしshouldAutorotateToInterfaceOrientation
ても効果はありません。
何か案は?
ありがとう!