- (void)webViewDidFinishLoad:(UIWebView *)webView
{
const CGFloat defaultWebViewHeight = 22.0;
//reset webview size
CGRect originalFrame = webView.frame;
webView.frame = CGRectMake(originalFrame.origin.x, originalFrame.origin.y, 320, defaultWebViewHeight);
CGSize actualSize = [webView sizeThatFits:CGSizeZero];
if (actualSize.height <= defaultWebViewHeight) {
actualSize.height = defaultWebViewHeight;
}
CGRect webViewFrame = webView.frame;
webViewFrame.size.height = actualSize.height;
webView.frame = webViewFrame;
}