• 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
Re: Optimal height for WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimal height for WebView


  • Subject: Re: Optimal height for WebView
  • From: Eric Gorr <email@hidden>
  • Date: Mon, 14 Jan 2013 13:09:15 -0500


Sent from my iPhone

On Jan 4, 2013, at 9:45 PM, Steve Christensen <email@hidden> wrote:

> On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote:
>
>> On 4 Jan 2013, at 18:12, Eric Gorr <email@hidden> wrote:
>>
>>> Good point Mike.
>>>
>>> However, after it has completed the layout, is it possible to determine the height of the content? If so, i could probably work with that information.
>>>
>>> But, I would still think it was possible to provide a method with a fixed width, have it perform a layout, and return the height - that is essentially what the stackoverflow solution does, just in a rather convoluted way.
>>
>> Well you've got the whole DOM API to play with. I'd have a play around with computed style etc. to see if you can pull out a useful figure.
>
>
> Ask the DOM what the height is. I use jquery but you could just as easily use standard Javascript methods to get the height.
>
> - (void) webViewDidFinishLoad:(UIWebView*)webView
> {
>    height = [[webView stringByEvaluatingJavaScriptFromString:@"$(document).height();"] integerValue];
> }

At least for me, this returns a value of zero.
_______________________________________________

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: Optimal height for WebView
      • From: Mike Abdullah <email@hidden>
References: 
 >Optimal height for WebView (From: Eric Gorr <email@hidden>)
 >Re: Optimal height for WebView (From: Keary Suska <email@hidden>)
 >Re: Optimal height for WebView (From: Eric Gorr <email@hidden>)
 >Re: Optimal height for WebView (From: Mike Abdullah <email@hidden>)
 >Re: Optimal height for WebView (From: Eric Gorr <email@hidden>)
 >Re: Optimal height for WebView (From: Mike Abdullah <email@hidden>)
 >Re: Optimal height for WebView (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Could somebody please fix NSTimer?
  • Next by Date: Re: Optimal height for WebView
  • Previous by thread: Re: Optimal height for WebView
  • Next by thread: Re: Optimal height for WebView
  • Index(es):
    • Date
    • Thread