iOS屏幕旋转后手动布局
作者:
盖盖678 | 来源:发表于
2017-12-25 16:31 被阅读0次// 监听设备旋转方向
[YCDeviceOrientation registerDeviceOrientationObserver:self selector:@selector(deviceOrientationChange)];
// 监听方法
- (void)deviceOrientationChange {
[self viewWillTransitionToSize:self.view.size];
}
// 可根据size或者interfaceOrientation设置布局
- (void)viewWillTransitionToSize:(CGSize)size {
UIInterfaceOrientation _interfaceOrientation = [YCDeviceOrientation interfaceOrientation];
本文标题:iOS屏幕旋转后手动布局
本文链接:https://www.haomeiwen.com/subject/ogwlgxtx.html
网友评论