I have got an UIScrollView that contain UIImageView.
I need to zoom my UIImageView.
I’m using method below:
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return imageView; // my UIImage about I describe here.
}
In viewDidLoad method I set frame for my UIImageView (e.g. NSRect: {{110, 180}, {100, 100}})
NSLog(@"image view frame %@", [NSValue valueWithCGRect:self.imageView.frame]);
in this case in log out this value: image view frame NSRect: {{110, 180}, {100, 100}}
but when I try to out put frame of imageView after zoom I get new value with a next amount:
{{9.9999971, 9.9999971}, {100.00001, 100.00001}}
And I don’t understand why I get this value 9.9999971. What I mean. Yes I know that after zoom we change our coordinate, but I dont understand why we get not a 9.0f instead 9.9999971 and why not 100.0 instead 100.00001
I have implemented demo code of image zoom which you have mentioned.
return imgZoom;
}
I have got value of imageview which I have set in the view did load.
I think you have done some thing wrong.
If you can share more then I can tell you in details.
Thanks