• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iPhone UIWebView height?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: iPhone UIWebView height?
      • From: Jesse Armand <email@hidden>
  • Prev by Date: Re: [MODERATOR] Re: GC Thread - Please, do _not_ crosspost
  • Next by Date: Re: Messages between Threads
  • Previous by thread: Re: [MODERATOR] Re: GC Thread - Please, do _not_ crosspost
  • Next by thread: Re: iPhone UIWebView height?
  • Index(es):
    • Date
    • Thread