// 监听设备旋转方向
[YCDeviceOrientation registerDeviceOrientationObserver:self selector:@selector(deviceOrientationChange)];
// 监听方法
- (void)deviceOrientationChange {
[self viewWillTransitionToSize:self.view.size];
}
// 可根据size或者interfaceOrientation设置布局
- (void)viewWillTransitionToSize:(CGSize)size {
UIInterfaceOrientation _interfaceOrientation = [YCDeviceOrientation interfaceOrientation];
网友评论