您的位置:首页 > 其它

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);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: