• 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: webFrame loadHTMLString and images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: webFrame loadHTMLString and images


  • Subject: Re: webFrame loadHTMLString and images
  • From: Greg Hoover <email@hidden>
  • Date: Fri, 2 Mar 2007 14:28:06 -0800

I'm fetching a page using resourceDataUsingCache then converting it to a string where I scrape out some relevant data. When I call loadHTMLString I pass the original url with a string representing the HTML I scraped out. So the URL is valid, though the displayed contents don't match what's at the url. Isn't the URL only relevant for relative paths though?

Greg
On Mar 2, 2007, at 12:05 PM, Dustin Wenz wrote:

On Mar 2, 2007, at 1:40 PM, Greg Hoover wrote:

I'm using a webView to show some scraped data. I first retrieve the data using [NSURL resourceDataUsingCache:], convert the data to an NSString and then add it to the webFrame using loadHTMLString. The problem is that none of the images are being retrieved/displayed. The IMG URLs are absolute and I've verified they exist by copying the same URL into a browser. Is there more to this process?


Are you providing the correct baseURL? If you are generating a file url using the NSURL methods, fileURLWithPath requires a valid path in order to work (unlike URLWithString, which will accept anything as long as it's in the expected format).

	- .Dustin


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >webFrame loadHTMLString and images (From: Greg Hoover <email@hidden>)
 >Re: webFrame loadHTMLString and images (From: Dustin Wenz <email@hidden>)

  • Prev by Date: QTMovieView times Two
  • Next by Date: Negate a boolean NSSNumber
  • Previous by thread: Re: webFrame loadHTMLString and images
  • Next by thread: QTMovieView times Two
  • Index(es):
    • Date
    • Thread