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); 
    } 
}
posted @ 2012-08-25 20:50  zyip  阅读(193)  评论(0编辑  收藏  举报