我有一个带有几个子视图的滚动视图。子视图定义如下:
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGRect rect = imageView.frame;
rect.size.height = screenRect.size.height;
rect.size.width = screenRect.size.width;
imageView.frame = screenRect;
[scrollView addSubview:imageView];
这工作正常,直到我将界面方向更改为横向。imageView 仍处于纵向模式,将图像切成两半。我应该怎么做才能将纵向高度和宽度更改为横向高度和宽度?