I have a pagecontrol using which I am managing a scroll view. Different pages in the scroll view contains imageviews. I want to zoom the images in that. Please help to find a solution. Following is my code.
pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, self.navigationController.navigationBar.frame.size.height, self.view.bounds.size.width,self.view.bounds.size.height/3)];
[self.view addSubview:pageControl];
scrollView =[[UIScrollView alloc] initWithFrame:CGRectMake(0, self.navigationController.navigationBar.frame.size.height, self.view.bounds.size.width,self.view.bounds.size.height/3)];
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * floorIdArray.count, scrollView.frame.size.height);
for( int i=0;i<floorIdArray.count; i++) {
NSString *floorid = [[NSString alloc] initWithFormat:@"%@",[floorIdArray objectAtIndex:i]];
NSString *imagePath = @"http:/
imagePath = [imagePath stringByAppendingString:floorid];
CGRect frame;
frame.origin.x = scrollView.frame.size.width * i;
frame.origin.y = 0;
frame.size = scrollView.frame.size;
UIImageView* imgView = [[UIImageView alloc] init];
[imgView sd_setImageWithURL:[NSURL URLWithString:imagePath]
placeholderImage:[UIImage imageNamed:@"imgmap.png"]];
imgView.frame = frame;
[scrollView addSubview:imgView];
UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchDetected:)];
pinchRecognizer.delegate=self;
[scrollView addGestureRecognizer:pinchRecognizer];
}
pageControl.currentPage = 0;
pageControl.numberOfPages = floorIdArray.count;
[self.view addSubview:scrollView];