1

i have used UIPinchGestureRecognizer in my application for zoom in or zoom out the image.its working on zoom in /zoom out . but i want to set the minimum and maximum scale of UIPinchGestureRecognizer So that the image is not zoom out smaller Than the ipad size . there is any way to set scale minimum and maximum scale of UIPinchGestureRecognizer. please reply me as soon as.

Thanks Pooja Rusia iphone Developer

beryllium
  • 29,669
  • 15
  • 106
  • 125
user410848
  • 11
  • 1
  • 2

2 Answers2

1
// Get pinch scale into pinchScale

float scale = fmaxf(pinchScale,
    fminf(ipadWidth / imageWidth, ipadHeight / imageHeight));

// Use scale instead of pinchScale
0

I Think it is better to take imageview into scrollview, By default scrollview has Zooming in - Zooming out options with implementing its delegate methods....not a problem also take pinch gesture it is also good one , you can fallow fallowing links ,they are helpful i think so...

using pinch gesture recognizer you can use these links for your requirement...

Limit maximum scale for scaling image with pinch gesture in IOS

http://paulsolt.com/2011/03/limiting-uipinchgesturerecognizer-zoom-levels/

UIPinchGestureRecognizer for zooming and panning an image in xcode

Max/Min Scale of Pinch Zoom in UIPinchGestureRecognizer - iPhone iOS

Thank you

Community
  • 1
  • 1
jillu_
  • 132
  • 1
  • 1
  • 6