iPhone UIWebView height?
iPhone UIWebView height?
- Subject: iPhone UIWebView height?
- From: William Jon Shipley <email@hidden>
- Date: Sat, 14 Mar 2009 17:12:58 -0700
Is it possible to set an HTML string on a UIWebView and have it resize
automatically to the right height, but NOT take up the entire screen?
I sure can't figure it out. I feel like the iPhone really HATES rich
text.
Here's what I've tried so far. Most of these are "Hail Mary" attempts,
which I didn't expect to work:
UIWebView *synopsisWebView = [[UIWebView alloc] initWithFrame:
(CGRect){CGPointZero, {CGRectGetWidth(self.scrollView.frame), 30.0}}];
synopsisWebView.autoresizingMask =
UIViewAutoresizingFlexibleHeight; // unrelated?
synopsisWebView.scalesPageToFit = YES; // just shrinks text
[synopsisWebView loadHTMLString:synopsisHTMLString
baseURL:nil];
[self.scrollView addSubview:synopsisWebView];
[synopsisWebView layoutIfNeeded]; // no visible effect
[synopsisWebView release];
NSLog(@"synopsisWebView frame %@",
NSStringFromCGRect(synopsisWebView.frame)); // still 30 high!
-W
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden