UIImageView Zoom in ScrollView
UIImage* image = [[UIImage alloc]initWithContentsOfFile:theImagePath];
imageView = [[UIImageView alloc]initWithImage:image];
imageView.frame = [[UIScreen mainScreen] bounds];
imageView.contentMode = (UIViewContentModeScaleAspectFit);
imageView.autoresizingMask = ( UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
imageView.backgroundColor = [UIColor blackColor];
scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
scrollView.contentMode = (UIViewContentModeScaleAspectFit);
scrollView.autoresizingMask = ( UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
scrollView.maximumZoomScale = 2.0;
scrollView.minimumZoomScale = 1;
scrollView.clipsToBounds = YES;
scrollView.delegate = self;
[scrollView addSubview:imageView];
UIViewController* viewController = [[DAUIViewController alloc]init];
[[viewController view]addSubview:scrollView];
[[self navigationController] pushViewController:viewController animated:YES];
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return imageView;
}MacBook+iMac, Mac OS X (10.4.6)