You can make a little sample app to check this. Add a sample pdf to your project, like this one: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf. In UIKit create a viewController in your storyboard with a button that will open a UIDocumentInteractionController like this:
@IBAction func openScreen() {
let urlPath = Bundle.main.path(forResource: "dummy", ofType: "pdf")!
let url = URL(filePath: urlPath)
let interactionController = UIDocumentInteractionController(url: url)
interactionController.delegate = self
interactionController.presentPreview(animated: true)
documentInteractionController = interactionController
}
func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController {
self
}
func documentInteractionControllerDidEndPreview(_ controller: UIDocumentInteractionController) {
documentInteractionController = nil
}
Then connect a hardware keyboard via Bluetooth, turn on Full Keyboard Access in your Accessibility Settings and try to navigate with TAB and arrow keys through the screen.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: