iphone - zoomToRect does nothing if your UIScrollView is already at that zoomlevel -
I think I've found a bug in the UIScrollView, but I want to check if others are seeing the same thing And if this is the expected behavior.
I have found a UIScrollView and trying to set what it is looking at when using zoomTract it works fine. If I drag the view and drag it somewhere else Is watching and then triggers zoomautract with the same values which it does nothing. The ZoomToRect command performs only a few things, if zoom scales need to be adjusted, if a pan is required, the scene just sits still. Since a user could pinch to zoom in or out, I was hoping to use zoomTorrect and should not scrutinize zoom level separately.
Has anyone else experienced this? Should it be or is it a bug?
*** Adding the code as a request
Call for the first time
[myScrollView zoomToRect: Animated ZoomToRect: Yes] ;
View the point exactly in the UIScrollView that I wanted to do
Now drag the user to the screen and move the point that is looking at UIScrollView No zooming, only panning is done.
Now call ZoomTorrect with the same rectangle
[myScrollView zoomtorct: zoomatork animated: yes];
Bugs with UIScrollView and will be fixed in future releases.
Meanwhile I've worked around it
float zoomBefore = myScrollView.zoomScale; [MyScrollView zoomToRect: Animated Zumtrum: Yes]; Float ZoomAfter = myScrollView.zoomScale; If (zoomBefore == zoomAffers) {[myScrollViewSetSearch offset: Image Kono Animated: Yes]; }
Comments
Post a Comment