缩放图像我怎样才能得到,当它由用户缩放图像大小, 我写下这些在我的项目:获取图像大小时,由用户
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
return imageView;
}
-(void) didLoad{
UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.jpg"]];
self.imageView = tempImageView;
[tempImageView release];
scrollMapView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height);
scrollMapView.maximumZoomScale = 4.0;
scrollMapView.minimumZoomScale = 0.75;
scrollMapView.clipsToBounds = YES;
scrollMapView.delegate = self;
[scrollMapView addSubview:imageView];
}
我只是想知道图像大小时,放大.. 谢谢。
你的意思是,如果一个200x400的图像以2倍显示,你想要的东西,返回400x800? – Vegar 2010-08-17 07:04:33
是啊,类似的东西..顺便说一句,我已经得到了.. thnx兄弟.. :) – 2011-06-20 03:15:17