// - 有时我们调用了这个方法 并且实现了屏幕旋转相关的代码但是屏幕还是没有旋转过来 有可能导致这个问题的原因是我们多次调用了移除
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
这个通知的问题 如果加入一次通知 移除一次通知没有问题,但是如果加入过一次通知但是移除通知两次,就会出现问题
[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeLeft] forKey:@"orientation"];
#pragma mark - 设备旋转
-(BOOL)shouldAutorotate{
return YES;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAllButUpsideDown;
}