У меня есть UIScrollView с pagingEnabled, чтобы страница пользователя между некоторыми изображениями. Теперь я хочу, чтобы пользователь увеличивал масштаб изображения на каждом из изображений. Как мне это сделать? Теперь у меня теперь увеличивается масштаб моего UIScrollView с самого начала, и мне нужно, чтобы он увеличивал масштаб изображения, а не отверстие UIScrollView.UIScrollView viewForZoomingInScrollView, когда pagingEnabled с несколькими UIImageViews в нем
Что я сейчас:
UIScrollView* containerView = [[UIScrollView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
containerView.scrollEnabled = YES;
containerView.pagingEnabled = YES;
[containerView setMaximumZoomScale:2.0];
[containerView setDelegate:self];
self.view = containerView;
UIImage *imageOne = [UIImage imageNamed:image01];
UIImageView *viewOne = [[UIImageView alloc] initWithImage:imageOne];
viewOne.frame = CGRectMake(0, 44, 320, 480);
[containerView addSubview:viewOne];
UIImage *imageTwo = [UIImage imageNamed:image02];
UIImageView *viewTwo = [[UIImageView alloc] initWithImage:imageTwo];
viewTwo.frame = CGRectMake(320, 44, 320, 480);
[containerView addSubview:viewTwo];
UIImage *imageThree = [UIImage imageNamed:image03];
UIImageView *viewThree = [[UIImageView alloc] initWithImage:imageThree];
viewThree.frame = CGRectMake(640, 44, 320, 480);
[containerView addSubview:viewThree];
- (UIView *) viewForZoomingInScrollView:(UIScrollView *)containerView
{
return containerView;
}
Заранее спасибо