縮放圖像我怎樣才能得到,當它由用戶縮放圖像大小, 我寫下這些在我的項目:獲取圖像大小時,由用戶
- (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