在我当前的应用程序中,我正在使用滚动视图,但在以纵向模式查看横向模式或 vsv 时遇到了一些问题。我为滚动视图分配的框架是(10,10,1024,550)和(10,10,1024,820)。我正在使用以下方法设置框架。
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {
if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
[self LandscpeFrame];
}
else
{
[self PotraitFrame];
}
}
但是当改变模式时它不能正常工作。如何设置滚动视图的框架以支持横向和纵向模式?