ipad/iphone ,adjust your layout when orientation will be changing , 旋转屏幕时调整界面布局

- ( void)willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 

    
     if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) 
    { 
        self.firstButton.frame = CGRectMake( 2020482708); 
        self.secondButton.frame = CGRectMake( 52220482708); 
    } 
     else 
    { 
        self.firstButton.frame = CGRectMake( 2020728472); 
        self.secondButton.frame = CGRectMake( 20512728207); 
    } 
}

你可能感兴趣的:(ORIENTATION)