ios - Load PDF in UIWebView and got error DiskImageCache: Could not resolve the absolute path of the old directory -


मैंने UIWebView में पीडीएफ लोड किया है

  NSString * thePath = [[NSBundle mainBundle] pathForResource : @ "सम्मेलनमेप_2014" टाइप की: @ "पीडीएफ"]; अगर (द पाथ) {एनएसडीटा * पीडीएफडेटा = [एनएसडीटा डाटाविथ कंटेंट्स ऑफ फाईल: द पाथ]; [WebViewPDF लोडडेटा: पीडीएफडेटा माइमटाइप: @ "एप्लिकेशन / पीडीएफ" टेक्स्ट एन्कोडिंगनाम: @ "यूटीएफ -8" आधारURL: शून्य]; }  

त्रुटि: DiskImageCache: पुराने निर्देशिका के पूर्ण पथ को हल नहीं किया जा सका।

हाय से क्लास फ़ाइल डाउनलोड करें।

फिर " UIView + DocumentView.h "आयात करें

उसके बाद पथ प्राप्त करें विशेष फ़ाइल

NSString * thePath = [[NSBundle मुख्य बंडल] pathForResource: @ "file1427464777.586564" टाइप की: @ "पीडीएफ"];

अगला कॉल विशेष पथ के साथ वर्ग [self.view makeDocumentView: thePath];


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -