0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Swift】PDFThumbnailViewの実装

Last updated at Posted at 2021-12-08

SwiftでPDFKitを使ってPDFThumbnailViewを実装する方法。

実装コード

SwiftでPDFKitを使ってPDFThumbnailViewを実装する方法。

import UIKit
import PDFKit

let pdfView = PDFView()//細かい設定は省略します
let pdfThumbnail = PDFThumbnailView()

pdfThumbnail.frame = CGRect(x: 0, y: view.frame.maxY - 100, width: view.frame.width, height: 100)//縦幅100、横幅全部のサイズ
pdfThumbnail.layoutMode = .horizontal//横向き
pdfThumbnail.pdfView = pdfView //PDFViewを紐付け
self.view.addSubview(pdfThumbnail)

参考

Swiftのお役立ち情報

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?