BaseViewController.m 1 KB
//
//  BaseViewController.m
//  SCIOLiveEN
//
//  Created by huayu on 16/7/14.
//  Copyright © 2016年 huayu. All rights reserved.
//
#import "BaseViewController.h"
@implementation BaseViewController
- (void)viewWillAppear:(BOOL)animated {
    NSNumber *orientationUnknown = [NSNumber numberWithInt:UIInterfaceOrientationUnknown];
    [[UIDevice currentDevice] setValue:orientationUnknown forKey:@"orientation"];
    
    NSNumber *orientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationMaskPortrait];
    [[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];
    
//    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
}
-(BOOL)forceEnableInteractivePopGestureRecognizer
{
    return YES;
    
}
- (BOOL)shouldAutorotate {
    return NO;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

@end