I'm trying to animate a UIWebview being removed from the screen. I'm using an animation block to set the frame height to 0. That works fine, the problem is the content size of the web view immediately takes the new frame height. So the content disappears and the background animates off. How can I stop that from happening? Here's my animation block.
// Change frame height.
[UIView animateWithDuration:1.0f
animations:^ {
// Animate the frame to the full height
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, 0);
}
];
Thanks