I am wondering if there was a way to animate the size and position of a UIWebView. If I do sth like this:
[UIView animateWithDuration:1.0 animations:^{
self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0);
}];
or
[UIView beginAnimations:@"zoomIn" context:nil];
[UIView setAnimationDuration:2.75];
[UIView setAnimationDelegate: self];
self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0);
[UIView commitAnimations];
while there is a grey box doing the animation, the content of the WebView instantly switches to the new size without animating. (the scalesPageToFit property is set to YES)
any suggestions on that?
Haven't cracked the instant changing of the text width yet but you can get rid of the grey box by programmatically changing the background of the UIWebView to clearColor. Doesn't work if you do it through Interface Builder, for some reason.
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