Bug 33434 - UIScrollView ZoomToRect is animating the scroll/zoom even though i'm sending false for animation bool
Summary: UIScrollView ZoomToRect is animating the scroll/zoom even though i'm sending ...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-08-27 14:59 UTC by Joey Z
Modified: 2015-09-02 12:35 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Joey Z 2015-08-27 14:59:42 UTC
XCode 6.4
Xamarin version 5.98

I'm trying to call ZoomToRect on a UIScrollView and I want it to NOT animate so I can wrap a UIView.Animate around it to set a custom duration. But the problem is when I call this.ScrollView.ZoomToRect with false in the animation booleon it's still animating the zoom/scroll! Is this a bug or am I doing something wrong?

InvokeOnMainThread (delegate {
    this.ScrollView.ZoomToRect (new CGRect (100,100, 500, 500), false);  

Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-09-01 07:20:36 UTC
This doesn't sound like a problem in Xamarin.iOS (since we're just a thin wrapper around the iOS API), but can you create a test project we can use to check this ourselves?
Comment 2 Joey Z 2015-09-02 12:29:00 UTC
Comment 3 Joey Z 2015-09-02 12:31:15 UTC
It appears my last comment didn't save.  I'll try again. Here's a sample project demoing the issue


I've solved the issue.  It was user error.  It appears that the boolean to set animation doesn't function correctly if your CGRect you pass in isn't within the min/max zoom scale of the UIScrollView.  I assumed it would because SetContentOffset tends to allow you to scroll passed the bounds of the contentsize so I didn't think it would be an issue with zooming, but apparently it is.  Anything outside the min/max zoomscale bounds breaks the animation.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-09-02 12:35:55 UTC
OK, I'm closing this then.