How can i add a zoom function to my scrollview in Potrate orientation, when the images are in an subview controllers. in orientation change i call a setup function to change
if (([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) ||
([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight)) {
self.navigationController.navigationBarHidden = YES;
[[UIApplication sharedApplication] setStatusBarHidden:YES];
[self setWantsFullScreenLayout:YES];
} else {
[[UIApplication sharedApplication] setStatusBarHidden:NO];
[self setWantsFullScreenLayout:NO];
self.navigationController.navigationBarHidden = NO;
//// Zoom enable ////
}
to load controllers
for (int i=0; i < [appDelegate.inGallery count];i++) {
ScrollViewPic *controller = [viewControllers objectAtIndex:i];
controller = [[ScrollViewPic alloc] initWithFrame:CGRectMake(0, 0, _scrollView.bounds.size.width, _scrollView.bounds.size.height)];
controller.svController= self;
[viewControllers replaceObjectAtIndex:i withObject:controller];
.....
Cant use viewForZoomingInScrollView because the images are in an other viewcontroller.
- (UIView *)viewForZoomingInScrollView:(UIScrollView *) scrollView {return imageView; }
How can this be done?