在M13PDFKit swift中删除完成按钮

时间:2016-11-02 08:58:55

标签: swift pdf pdf-viewer m13pdfkit

我正在使用M13PDFKit并遇到一些问题。在示例中,完成按钮不存在,但是当我尝试它时显​​示。我不知道如何删除它。完成按钮看起来像这样。我正在使用Swift enter image description here

在View控制器中

就像这样

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)
    }
}
}

1 个答案:

答案 0 :(得分:1)

转到 PDFKBasicPDFViewer.m 停用第一张图片中突出显示的行(第247行)并运行项目....

enter image description here

输出:

enter image description here