AM在旋转后在UIScrollview上添加的ImageView上显示图像时遇到了麻烦
我的UIScrollView上有很少的UIImageViews(8种不同)。
问题是,当我旋转设备时,我更改了UIscrollview 的框架(仅x,y轴)和(x,仅y轴) ,它不会显示图像,我在旋转后添加到UIimageViews上。
旋转后,我触摸了ScrollView,然后再次显示Uiimageviews上的图像。我尝试了一切。冲浪Stackoverflow和谷歌,没有找到,在我的情况下工作。
//Magazine Images
//subview1 MAG Imaegs
[[asy_Array_Mag_sub1 objectAtIndex:0] setFrame:CGRectMake(59, 120, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:1] setFrame:CGRectMake(296, 120, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:2] setFrame:CGRectMake(576, 120, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:3] setFrame:CGRectMake(802, 176, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:4] setFrame:CGRectMake(57, 465, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:5] setFrame:CGRectMake(296, 383, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:6] setFrame:CGRectMake(570, 377, 136, 174)];
[[asy_Array_Mag_sub1 objectAtIndex:7] setFrame:CGRectMake(802, 486, 136, 174)];
[self.otlScrollView setFrame:CGRectMake(0, 0, 1024, 768)];
self.otlScrollView.contentSize = CGSizeMake(1024 * total_pages, 768);
[_otlSubView setFrame:CGRectMake(a1, 0, 1024, 768)];
[self.otlScrollView addSubview:_otlSubView];
[_otlSubView2 setFrame:CGRectMake(b1, 0, 1024, 768)];
[self.otlScrollView addSubview:_otlSubView2];
[_otlSubView3 setFrame:CGRectMake(c1, 0, 1024, 768)];
[self.otlScrollView addSubview:_otlSubView3];
[_otlScrollView setContentOffset:CGPointMake(1024 * (self.otlPageControl.currentPage), 0)];