0

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

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

    if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
         {

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

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

4

1 回答 1

0

没有看到你的LandscapeFramePortraitFrame方法我不能确定,但​​是contentSize当你改变框架时你是否设置了这两种方法?

于 2012-04-29T13:06:44.113 回答