UIWebView and animation

I am wondering if there was a way to animate the size and position of a UIWebView. If I want to:

[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 the gray box does the animation, the contents of the WebView instantly switch to a new size without animation. (the scalesPageToFit property is set to YES)

any suggestions on this?

+5
source share
1 answer

Do not change the instant width of the text, but you can get rid of the gray window by programmatically changing the background of the UIWebView to clearColor. It does not work if you do this through Interface Builder for some reason.

+2
source

All Articles