title: How to display pdf on iOS
body: <p>I want to know if there is any way for a offline build for <code>xcode iOS</code> such that we can display pdf file from local file. </p>
  
  <p>The method I'm using now is via <code>UIWebView</code> to display a custom HTML which contain the PDF URL (online) , but I want to make an offline version if possible.</p>
  
  <p>But from online research, it seems to me the only way to display PDF is via UIWebView, if that is really the case, is it possible to pull the file from local resource (e.g. add files to my xcode resource folder) rather than using the PDF URL.</p>
  
  <p>OFF-TOPIC:
  Which would be a better choice? To pull local file or to use the online URL for PDF file?</p>
  
  <p>As <code>UIWebView</code> require connection, it would seem to be a better choice to just pull the online URL as it will be the most current and updated.</p>
  
  <p>Feedback is much appreciated.</p>
  
  <p>EDIT: quick question, if I use the <code>UIDocumentInteractionController</code> method or the <a href="https://developer.apple.com/library/archive/samplecode/ZoomingPDFViewer/Listings/ZoomingPDFViewerCocoa_ZoomingPDFViewer_TiledPDFScrollView_m.html" rel="nofollow noreferrer">QuickLook framework</a> to make it offline, this would mean I have to release update patch each time there is new PDF article added in (correct me if I'm wrong)</p>
  
  <p>Taking this point into consideration, I've come up with a counter-argument to my own question on the spot (Sorry if any of you feel you are wasting time on me >.&lt;, I am a person who like to question possibilities and the different approach one could take to solve a problem)
  In the event to save time from the constant updating and providing a real time base solution, which is to use UIWebView (I know this is contradicting my purpose of this SO thread), as this proj is base on a online website (getting my content and sources from there), if I were to load their website for the article section, would it be bold of me to say that by adding a NSString variable, I can add in the NSRange function to the viewDidLoad together with the UIWebView such that the URL will never leave the news section and PDF URL. e.g. using combination of if and NSRange function to counter check that the URL only contain the news section and PDF URL)</p>
  
  <p>I did once before a NSRange function for point on calculator so I thought it would be a good time to put it in use for this framework app.</p>
  
  <p>P.S - This app is a organization base project and I'm a intern providing them with the base skeleton framework.</p>