With UIScrollView zoom images in layout

I created an application in Xcode.

In my applications, I need functionality that has multiple images in the uiscroll view.

I cannot zoom in on scroll mode. How am i doing this?

-one
iphone cocoa-touch uiview
source share
1 answer

place the image in the scroll view and make user interaction, as well as the possibility of multiple touch in each, now

make the following settings in your scroll view:

//Pinch Zoom Stuff imageScrollView.maximumZoomScale = 4.0; imageScrollView.minimumZoomScale = 1.0; imageScrollView.clipsToBounds = YES; imageScrollView.delegate = self; imageScrollView.scrollEnabled = NO; 

Then follow these methods:

 - (void)scrollViewDidZoom:(UIScrollView *)scrollView { if (scrollView.zoomScale!=1.0) { // Not zoomed, let the scroll view scroll imageScrollView.scrollEnabled = YES; } else { // Zooming, disable scrolling imageScrollView.scrollEnabled = NO; } } - (UIView *) viewForZoomingInScrollView:(UIScrollView *)scrollView { return imageView; } 
+3
source share

All Articles