在ipad的肖像和风景的scrollview

时间:2012-04-28 16:05:01

标签: ios ipad uiscrollview landscape-portrait

在我当前的应用程序中使用scrollview但面临一些问题,从纵向到横向模式或vsv查看时。我为滚动视图分配帧是(10,10,1024,550)和(10,10,1024,820)。我正在使用以下方法来设置框架。

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {

    if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
         {

                 [self LandscpeFrame];
        }
    else 
    {
                [self PotraitFrame];
        }
}

但是当改变模式时它无法正常工作。如何设置滚动视图的框架以支持横向和纵向模式?

1 个答案:

答案 0 :(得分:0)

如果没有看到LandscapeFramePortraitFrame方法,我无法确定,但是当您更改框架时,是否在这两种方法中都设置了contentSize

相关问题