In a UITextView i can resize the height of the control to it's content like this:
CGRect frame = textView.frame;
frame.size.height = textView.contentSize.height;
textView.frame = frame;
But i want to use an UIWebView instead in order to show rich text. The UIWebVie's content is:
NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n"
"<head> \n"
"<style type=\"text/css\"> \n"
"body {font-family: \"%@\"; font-size: %@; }\n"
"</style> \n"
"</head> \n"
"<body>%@</body> \n"
"</html>", @"helvetica",
[NSNumber numberWithInt:12], @"yadayadayada..."];
[webView loadHTMLString:myDescriptionHTML baseURL:nil];
So the UIWebView contains nothing but plain text. How can i achieve result similar to the above UITextView code?