UIWebView resizing

Status
Not open for further replies.
Code:
//Called from webViewDidFinishLoad. I tried to use perf

//prev is the frame of the view above it
//screenWidth is actually 20 pixels narrower than the screen, so I'd have margins
details.frame = CGRectMake(10, 10 + CGRectGetMaxY(prev), screenWidth, 5); //Heard it helps
CGFloat detailsHeight = [details sizeThatFits:CGSizeMake(screenWidth, 150000)].height;
details.frame = CGRectMake(10, 10 + CGRectGetMaxY(prev), screenWidth, detailsHeight)

So, this seemingly simple piece of code is one of many variations of code I tried to get this thing to work. I tried using CGSizeZero in the penultimate line, and also tried several different tricks with Javascript. But the result remains screwy, with the current incarnation the screwiest of all: the text is too wide, but there's no horizontal scrollbar.

The Web view is contained in a scroll view, and I'm trying to stretch it out so it wouldn't try to do its own scrolling.
 
Status
Not open for further replies.