potrait中的滚动视图和ipad中的风景

问题描述:

在我当前的应用程序中,我使用scrollview但面临一些问题,当在potrait中查看风景模式或vsv.I为滚动视图分配帧时(10,10,1024,550)和(10,10,1024,820)。我使用以下方法设置框架。potrait中的滚动视图和ipad中的风景

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

    if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) 
     { 

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

但改变模式时,它不能正常工作properly.How设置为滚动型的框架,以支撑风景和potrait模式?

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

+0

scrollView.frame = CGRectMake(10,10,1024,550)for landscape和 scrollView.frame = CGRectMake(10,10,1024,820);对于potrait – user1017932 2012-04-30 16:21:19

+0

没有设置只有帧大小设置内容size.please帮助。 – user1017932 2012-04-30 16:37:01

+0

尝试设置'scrollView.contentSize = CGSizeMake(width,height);' – 2012-05-01 18:39:11