Я реализовал WKWebView и отобразил в нем файл PDF, теперь я хочу добавить страницы в закладки. Для этого мне нужно знать
1) How to get current Page Number of PDF displayed
2) How to scroll WKWebView to that page number later on.
Пока я сделал это:
let pathOfPDF = URL(fileURLWithPath: Bundle.main.path(forResource: "pdfFile", ofType: "pdf")!)
let request = URLRequest(url: pathOfPDF)
pdfView.frame = CGRect(x: view.frame.width/26, y: view.frame.height/12.5, width: view.frame.width-view.frame.width/13, height: view.frame.height - view.frame.height/12.5)
pdfView.uiDelegate = self
activityIndicatorIcon.hidesWhenStopped = true
pdfView.allowsBackForwardNavigationGestures = true
pdfView.load(request)
pdfView.navigationDelegate = self