移除 M13PDFKit 中的完成按钮 swift
Remove done button in M13PDFKit swift
我在使用 M13PDFKit 时遇到了一点问题。在示例中,完成按钮不存在,但当我尝试时它会显示。我不知道如何删除它。完成按钮看起来像这样。我正在使用 Swift
在视图控制器中就像这样
import UIKit
import M13PDFKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "NEXT" {
let viewer: PDFKBasicPDFViewer = segue.destinationViewController as! PDFKBasicPDFViewer
viewer.enableBookmarks = true
viewer.enableBookmarks = true
viewer.enableOpening = true
viewer.enablePrinting = true
viewer.enableSharing = true
viewer.enableThumbnailSlider = true
//Load the document (pdfUrl represents the path on the phone of the pdf document you wish to load)
let pdfUrl = "/Users/developer/Library/Developer/CoreSimulator/Devices/C8DC5F44-B2FC-4FC3-8E10-B87FC00791FA/data/Containers/Data/Application/047BE9AD-F43C-421E-B5B5-943B0C79B592/Documents/Yudi Seven.pdf"
let document: PDFKDocument = PDFKDocument(contentsOfFile: pdfUrl, password: nil)
viewer.loadDocument(document)
}
}
}
转到 PDFKBasicPDFViewer.m 禁用第一张图片中突出显示的行(第 247 行)和 运行项目....
输出:
我在使用 M13PDFKit 时遇到了一点问题。在示例中,完成按钮不存在,但当我尝试时它会显示。我不知道如何删除它。完成按钮看起来像这样。我正在使用 Swift
在视图控制器中就像这样
import UIKit
import M13PDFKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "NEXT" {
let viewer: PDFKBasicPDFViewer = segue.destinationViewController as! PDFKBasicPDFViewer
viewer.enableBookmarks = true
viewer.enableBookmarks = true
viewer.enableOpening = true
viewer.enablePrinting = true
viewer.enableSharing = true
viewer.enableThumbnailSlider = true
//Load the document (pdfUrl represents the path on the phone of the pdf document you wish to load)
let pdfUrl = "/Users/developer/Library/Developer/CoreSimulator/Devices/C8DC5F44-B2FC-4FC3-8E10-B87FC00791FA/data/Containers/Data/Application/047BE9AD-F43C-421E-B5B5-943B0C79B592/Documents/Yudi Seven.pdf"
let document: PDFKDocument = PDFKDocument(contentsOfFile: pdfUrl, password: nil)
viewer.loadDocument(document)
}
}
}
转到 PDFKBasicPDFViewer.m 禁用第一张图片中突出显示的行(第 247 行)和 运行项目....
输出: