iphone uiscrollview and uiimageview - setting initial zoom
Posted
by Brodie4598
on Stack Overflow
See other posts from Stack Overflow
or by Brodie4598
Published on 2010-04-21T17:30:42Z
Indexed on
2010/04/21
17:33 UTC
Read the original article
Hit count: 980
I use the following code to load an image into an scroll view. The image always loads at 100% zoom. Is there a way to set it to load to another zoom level, say .37?
UIImageView *tempImage = [[UIImageView alloc]initWithImage:[UIImage imageWithData:data]];
self.imageView = tempImage;
scrollView.contentSize = CGSizeMake(imageView.frame.size.width , imageView.frame.size.height);
scrollView.maximumZoomScale = 1;
scrollView.minimumZoomScale = .37;
scrollView.clipsToBounds = YES;
scrollView.delegate = self;
[scrollView addSubview:imageView];
© Stack Overflow or respective owner