当用ios 程序打开unity的图形时,我旋转之后再退出时 最上面的导航栏没了 我的旋转是这样写的
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; if (self.allowLandscapeRight) { return UIInterfaceOrientationMaskLandscapeRight; } return UIInterfaceOrientationMaskPortrait;}//强制旋转成全屏 NSNumber *value = [NSNumber numberWithInt:UIDeviceOrientationLandscapeLeft]; [[UIDevice currentDevice]setValue:value forKey:@"orientation"];//旋转回来NSNumber *value = [NSNumber numberWithInt:UIDeviceOrientationPortrait]; [[UIDevice currentDevice]setValue:value forKey:@"orientation"];