Is there any way to specify a duration for the animation of [UIScrollView zoomToRect:zoomRect animated:YES]
?
At the moment it's either fast animated:YES
or instant animated:NO
.
I'd like to specify a duration, eg [UIScrollView setAnimationDuration:2]
; or something similar.
Thanks in advance!
Use the UIView's animations.
It's a bit long to explain, so I hope this little example will clear things up a bit. Look at the documantation for further instructions
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 2];
[UIView setAnimationDelegate: self];
[UIView setAnimationDidStopSelector: @selector(revertToOriginalDidStop:finished:context:)];
expandedView.frame = prevFrame;
[UIView commitAnimations];
It's from a project I'm currently working on so it's a bit specific, but I hope you can see the basics.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With