【发布时间】:2013-12-05 05:55:49
【问题描述】:
我想捏缩放 uiscrollview 图像。我在 uiscrollview 中添加了多个图像 但捏缩放不起作用我想捏缩放 UIImageview 图像。我参考了很多参考资料,但仍然无法正常工作
提前致谢
我的代码:-
for(int i = 0;i<aryImage.count;i++)
{
//Create a uiimageview
imageView =[[UIImageView alloc]init ];
imageView.frame = CGRectMake((280 *i),0.0, 280, 475);
imageView.image = [UIImage imageNamed:@"default.png"];
imageView.tag = i;
imageView.userInteractionEnabled = YES;
[scrollGallery addSubview:imageView];
scrollGallery.minimumZoomScale = 1.0;
scrollGallery.maximumZoomScale = 2.0;
scrollGallery.delegate = self;
[scrollGallery addSubview:imageView];
}
scrollGallery.contentSize = CGSizeMake(280 * aryImage.count, scrollGallery.frame.size.height);
pageControl.numberOfPages = aryImage.count;
pageControlBeingUsed = NO;
pageControl.currentPage = 0;
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return imageView;
}
【问题讨论】:
标签: iphone xcode uiscrollview ios7