Possible Duplicate:
Any way of changing the duration of zoomToRect for UIScrollView?
Is there any way to replicate the behaviour of [UIScrollView zoomToRect:zoomRect animated:YES] such that the animation lasts for a given duration?
You can put this in your UIScrollView
subclass:
- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated
{
[UIView animateWithDuration:(animated?0.3f:0.0f)
delay:0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
[super zoomToRect:rect animated:NO];
}
completion:nil];
}
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