I have an app where i would like to dynamically zoom in and out an imageView.
I use [scrollView zoomToRect:CGRectMake(x,y,z,k) animated:YES];
to zoom in but i would like the animation to be slower ... is there a way to set the animation speed?
I have an app where i would like to dynamically zoom in and out an imageView.
I use [scrollView zoomToRect:CGRectMake(x,y,z,k) animated:YES];
to zoom in but i would like the animation to be slower ... is there a way to set the animation speed?
see my other answer. You can set the animation duration to something like 1.0
second.
instead of:
cursorView.center = locationOfTouch;
you have to set:
[UIView beginAnimations:nil context:NULL]
[UIView setAnimationDuration:1.0];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[scrollView zoomToRect:CGRectMake(x,y,z,k) animated:NO]; // NO is necessary!
[UIView commitAnimations];