读书人

ipad开发屏幕翻转控件大小适应有关问

发布时间: 2012-02-01 16:58:19 作者: rapoo

ipad开发,屏幕翻转控件大小适应问题
请问,ipad开发,屏幕支持各个方向翻转,如何解决屏幕适应的问题,加这个函数
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}

支持各个方向旋转,但具体的当旋转到某一个方向时,会调用什么函数?我想的是,在相应的函数中调整图片的大小和
位置,不知道这样行不行?感觉有点繁琐,有没有更好的方法,谢谢了!

[解决办法]

C/C++ code
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{    if (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)?? 

读书人网 >Iphone

热点推荐