-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if(UIInterfaceOrientationIsLandscape(toInterfaceOrientation))//横屏时候
{
[self.view viewWithTag:3].frame=CGRectMake(100.,100.,130,.130.);//调整视图中tag值为3的控件的位置,100. 加小数点为double类型,不加则为int型
}
else //竖屏时
{
[self.view viewWithTag:3].frame=CGRectMake(20.,20.,130,.130.);
}
}
{
if(UIInterfaceOrientationIsLandscape(toInterfaceOrientation))//横屏时候
{
[self.view viewWithTag:3].frame=CGRectMake(100.,100.,130,.130.);//调整视图中tag值为3的控件的位置,100. 加小数点为double类型,不加则为int型
}
else //竖屏时
{
[self.view viewWithTag:3].frame=CGRectMake(20.,20.,130,.130.);
}
}