UIWebView can't load pdf files after adding missing constraints -


My app works fine before adding obstacles to UIWebView. However, there is an error:

  DiskImageCache: The full path to the old directory could not be resolved.  

The app still works and shows the PDF file after adding some constraints, it will not show the PDF file (it appears empty), and the error code is still there .

Here are some pictures:

PIC 1:

PIC 2:

This is my code:

  {NSString * tutorialView = [ NSString stringWithFormat: @ "Chapter% i", Tutorial number]; NSDRAUL * PathTouch = [NSUF file URLTHTH Path: [[NSBindel Main Bundle] Pathfortsource: Tutorial ViewType: @ "PDF"]]; [_webView2 loadRequest: [NSRR request request with url: pathwive]]; }  

Is there a better way to view PDF files? I'm new to iOS programming. Sorry for the stupid question

Try it with the following work The way is fine with me :)

  UIWebView * pdf = [[UIWebView alloc] initWithFrame: CGM (0,0, self.view.frame.size.width, self.view.frame .size.height)]; NSString * path = [[NSBundle mainBundle] pathForResource: @ "pdf file name" type: @ "pdf"]; NSURL * targetURL = [NSUr file URLWithPath: Path]; Pdf.scalesPageToFit = Yes; NSURLRequest * Request = [NSRR request request with url: targetURL]; & Lt; Br> [Pdf load request: request]; [Self.view addSubview: PDF];  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -