tags:

views:

196

answers:

1

Hi, 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

A: 
// Get pinch scale into pinchScale

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

// Use scale instead of pinchScale
Johannes Martinsson