【发布时间】:2014-04-13 20:15:13
【问题描述】:
我想在全景图像上添加UIScrollView,以便您可以水平平移图像。由于某种原因,我使用的代码不允许用户水平滚动。
为什么不水平滚动?
代码如下:
[scrollView setFrame:CGRectMake(0,160,1338,269)];
scrollView.scrollEnabled = YES;
scrollView.userInteractionEnabled = YES;
UIImageView *panorama = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 1338, 269)];
panorama.image = [UIImage imageNamed:@"Panorama.png"];
scrollView.contentSize = CGSizeMake(320, 269);
[scrollView addSubview:panorama];
[self.view addSubview:scrollView];
【问题讨论】:
标签: ios objective-c uiscrollview uiimageview panoramas