Edit: I have controller containing uiscrollview. That scrollview contains custom uiview having its separate class inherited from uiview. That uiview has uiimageview as subview. No i am taking "(UIView*)viewForZoomingInScrollView:(UIScrollView *)scrollView" in main controller. But that method didn't get fire when i zoom scrollview. What should i do so that this method may get called.
UIView *DrawingPlusImageView = [[UIView alloc]initWithFrame:CGRectMake((i*IMAGEVIEW_IPAD_LAND_X+112), 0, 800, 600)];
IDDrawingView *drawView = [[IDDrawingView alloc]initWithFrame:CGRectMake(0, 0, 800, 600)];
UIImageView* imgViewLand = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)];
[imgViewLand setImage:[UIImage imageNamed:@"noFileSelected.png"]];
[drawView setImageToDraw:imgViewLand.image];
// drawView.delegate = self;
[drawView setCurrentSlidId:hmslide.strSlideID];
[DrawingPlusImageView addSubview:imgViewLand];
[DrawingPlusImageView addSubview:drawView];
[scrollViewPresentation addSubview:DrawingPlusImageView];
drawView.userInteractionEnabled = YES;
- (UIView*)viewForZoomingInScrollView:(UIScrollView *)scrollView {
// Return the view that we want to zoom
return [self.scrollViewPresentation.subviews objectAtIndex:1];// there are slides, im zooming the second
}