I want to zoom an image in a scroll view. I used the below code. All are working fine, but the image is not zooming. Anyone please help. I am a beginner in iPhone app development.
I had connected the delegate to files manager and set max zooming to 5
I can see the image. But how can I zoom it.
IBOutlet UIScrollView *scrForImg; IBOutlet UIImageView *imgForScr;
(void)viewDidLoad { [super viewDidLoad];
NSString *imagePath = [NSString stringWithFormat:@"myImage.png"];
imgForScr.image = [UIImage imageNamed:imagePath];
}
-(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
return imgForScr;
}