iphone - Displaying an image in UIWebView -


मैं UIWebView में एक छवि का उपयोग करके

  & lt; img src = "imageInBundle.png" / & gt;  

उपरोक्त छवि मेरे बंडल में है मैं इसे एक स्ट्रिंग में अन्य एचटीएमएल के साथ लोड करता हूं, जैसे:

  [myWebView लोड HTML स्ट्रिंग: htmlString baseURL: [NSURL URLWithString: @ "http://www.abc.com"]] ;  

हालांकि, मुझे सिर्फ एक सफेद प्रश्न चिह्न के साथ एक नीला बॉक्स मिलता है। क्या मुझे कुछ और करना है?

बदलने की कोशिश करें

 < कोड> [एनएसURL URLWithString: @ "http://www.abc.com"]  

से

  [एनएसयूआर फ़ाइल URLWithPath: पथ]   

जहां पथ कुछ ऐसा है

  NSString * path = [[NSBundle mainBundle] बंडलपाथ];  

... छवि के स्थान पर निर्भर करता है।


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -