ipad/iphone ,adjust your layout when orientation will be changing , 旋转屏幕时调整界面布局
2012-08-25 20:50
459 查看
- (void)willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
self.firstButton.frame = CGRectMake(20, 20, 482, 708);
self.secondButton.frame = CGRectMake(522, 20, 482, 708);
}
else
{
self.firstButton.frame = CGRectMake(20, 20, 728, 472);
self.secondButton.frame = CGRectMake(20, 512, 728, 207);
}
}
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
self.firstButton.frame = CGRectMake(20, 20, 482, 708);
self.secondButton.frame = CGRectMake(522, 20, 482, 708);
}
else
{
self.firstButton.frame = CGRectMake(20, 20, 728, 472);
self.secondButton.frame = CGRectMake(20, 512, 728, 207);
}
}
相关文章推荐
- ipad流水布局及其旋转界面view间隔布局调整
- ios(ipad,iphone)屏幕旋转检测通用方法
- 旋转实现iOS(iPhone/iPad) 屏幕旋转响应函数的缺点与窗口大小位置调整,以及解决办法
- iPhone/iPad 屏幕旋屏 iphone / ipod deployment info 调整
- ios(ipad,iphone)屏幕旋转检测通用方法
- iOS提交审核:“your app did not run at iPhone resolution when reviewed on iPad run iOS 10.1.1”
- 修改屏幕的旋转方向,使用与IPHONE以及IPad
- 原生静态布局下,用div+css实现界面随着不同的屏幕变换自动调整大小
- 处理iPhone 6s plus/iPad 横屏启动App界面布局错乱问题
- 处理iPhone 6s plus/iPad 横屏启动App界面布局错乱问题
- 九十五、iphone屏幕旋转、改变 视图尺寸 和 布局控制
- iPhone/iPad 屏幕旋屏 iphone / ipod deployment info 调整
- android的TableLayout布局界面元素填满整个屏幕
- UIView设置为自动适配屏幕时,当用户旋转设备的时候,会调用layoutSubviews方法,我们只需重写 这个方法,然后判断用户屏幕的方向。在调整每个空间的位置即可。
- Autolayout .Compact or .Regular [iPhone/iPad]
- iPad、iPhone 界面设计标准
- iOS:界面适配(二)--iPhone/iPad适配(关于xib)
- the file contains top level spacers. They will not be saved.Perhaps you forgot to create a layout
- iphone横竖屏切换,旋转屏幕
- 界面布局动态调整