![]() PDFViewController gets the instances from this controller and provides them to UIPageViewController. PDFDocumentController manages a PDF document and caches PDFPageViewController's instances. This role is played by PDFDocumentController mentioned below. So by instantiating this class beforehand, the content is ready to be used when its content is displayed. PDFPageViewController generates the image of its content on background thread when instantiated. Since the new page is always displayed in a state which is not zoomed in, PDFPageViewController uses UIImageView to draw its content when not zoomed in. In contrast, UIImageView is not suited to show scalable content, but it draws its content far faster than CATiledLayer. But this class is slow to draw its content, so the content is not properly drawn when UIPageViewController's page curl transition occurs. PDFPageDrawView shows the content when not zoomed in using UIImageView, and PDFPageDrawView shows the same content when zoomed in using CATiledLayer.ĬATiledLayer is well suited to show scalable content like PDF. This view controller uses two views PDFPageImageView and PDFPageDrawView. PDFPageViewController shows the content of each page of a PDF document. PDFPageViewController, PDFPageImageView, PDFPageDrawView The UIPageViewController's view is added to the scroll view as its subview. This view controller has a scroll view (UIScrollView) to enable the zoom functionality. This view controller is the container view controller of UIPageViewController. ![]() ![]() PDFViewController is the main class of the PDF viewer. The figure below shows the main relationships between the classes of the PDF viewer. ![]() See two facing pages on landscape orientation.Turn a page by tapping on the edge of the page.The PDF viewer of this project lets the user: This is a sample project to demonstrate how to implement a PDF viewer for iOS which supports zoom and page curl transition. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |