Change I have a controller containing uiscrollview. This scrollview contains a custom uiview having a separate class inherited from uiview. This uiview has uiimageview as a subview. No, I take "(UIView *) viewForZoomingInScrollView: (UIScrollView *) scrollView" in the main controller. But this method did not work when I scale the scrollview. What should I do for this method to be 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];
source share