在viewDidLoad中加入
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectShowOrientation) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
并添加相关函数
-(void)detectShowOrientation{
if ([UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationLandscapeLeft ||[UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationLandscapeRight) {//
NSLog(@"videolist 横屏");
}else{//
NSLog(@"videoList 竖屏");
}
}