• 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: Problems displaying an image in UIWebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems displaying an image in UIWebView


  • Subject: Re: Problems displaying an image in UIWebView
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 16 Jul 2009 17:53:52 +0100


On 16 Jul 2009, at 17:28, M.S. Hrishikesh wrote:

Forgot to add:

I am accessing the image file like this
NSString *imageName = [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"];


I have confirmed (using NSLog) the path printed in the <img> tag is correct

<img align="center" src="/Users/hrishi/Library/Application Support/ iPhone Simulator/User/Applications/87888BAB-2F9D-44F6-BEB8- FB7D65D2F1CC/Epicures.app/myImage.png" />

Ah there we go then:

Paths != URLs

Construct an NSURL object for your resource and use a string representation of that in your HTML.
_______________________________________________


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


References: 
 >Problems displaying an image in UIWebView (From: "M.S. Hrishikesh" <email@hidden>)
 >Re: Problems displaying an image in UIWebView (From: "M.S. Hrishikesh" <email@hidden>)

  • Prev by Date: Re: Windowed Video
  • Next by Date: Re: Problems displaying an image in UIWebView [solved]
  • Previous by thread: Re: Problems displaying an image in UIWebView
  • Next by thread: Re: Problems displaying an image in UIWebView [solved]
  • Index(es):
    • Date
    • Thread