我有一个 UIScrollView ,并启用了滚动。它与委托方法工作正常。
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
return MyScrollView;
}
但我面临的问题是,当我旋转 iPad 时,我需要缩小 UIScrollView。我必须在这个函数中编码
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight){
}
if(interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
{
}
}