How to fit PDF height in UIWebView in iPhone/iPad

前端 未结 1 1484
清歌不尽
清歌不尽 2021-01-22 03:11

I have a project that uses a UIWebView to display a single page PDF file. I would like this content to fit by height (vertically). The default is only to fit width (horizontal

相关标签:
1条回答
  • 2021-01-22 03:48

    I ran against the same problem and couldn't find a way to do it with UIWebView. If you only want to display a single PDF-page, you can pretty much take the code from Apple's ZoomingPDFViewer Example.

    I took the two classes PDFScrollView and TiledPDFView and with a little adjustment for my project, I was easily able to use it to display a single PDF page.

    0 讨论(0)
提交回复
热议问题