こんにちは
ある特定のビューで向きを設定したいので、どうすればそれを行うことができますか。andbodyにはその例があります。私は使用しました
-(void)onUIDeviceOrientationDidChangeNotification:(NSNotification*)notification{
UIViewController *tvc = self.navigationController.topViewController;
UIDeviceOrientation orientation = [[ UIDevice currentDevice ] orientation ];
tabBarController.view.hidden = YES;
// only switch if we need to (seem to get multiple notifications on device)
if( orientation != [[ UIApplication sharedApplication ] statusBarOrientation ] ){
if( [ tvc shouldAutorotateToInterfaceOrientation: orientation ] ){
[ self rotateInterfaceToOrientation: orientation ];
}
}
}
でもそれはアプリケーション全体で、1つの画面だけでやりたいので返信してくださいありがとうございます