In my ipad openGL based application I am drawing a 2D and 3D object and rotating it according to the user's finger motion....On pinching the screen user is enable to zoom those objects...But what I want 开发者_如何学JAVAis to prevent zooming the object at some limit, say more than 2x of the object size user cannot zoom in and user cannot zoom out more than object's original size
I am zooming the object with help of "CATransform3DScale"
Any hint please....
Thanks in advance and help appreciated.
If you are using the UIPinchGestureRecognizer and setting the scale value of it directly as your 3D scale value then just do something like
if(scale >= 2.0f){
scale = 2.0f;
}
that's basically what i do.
精彩评论