小编Fai*_*sal的帖子

如何使用 UIDocumentInteractionController?

我创建了一个加载 PDF 文件的程序。我希望当用户编辑时,他们可以以 PDF 格式在任何地方发布文件。

我使用UIDocumentInteractionController还是使用UIActivityViewController

这是代码:

import UIKit
import PDFKit

@available(iOS 11.0, *)
@available(iOS 11.0, *)

class PDFViewControllerEN: UIViewController {
    var document: UIDocumentInteractionController!

    override func viewDidLoad() {
        super.viewDidLoad()
        // retrieve URL to file in main bundle`
    }

    @IBOutlet var pdfview: UIView!

    @IBAction func share(_ sender: UIButton) {
    }

    @IBAction func doAction2(_ sender: UIBarButtonItem) {
        document.presentOptionsMenu(from: view.bounds, in: view, animated: true)
    }

    override func viewWillAppear(_ animated: Bool) {
        //Here you are going to display your PdfController …
Run Code Online (Sandbox Code Playgroud)

ios uidocumentinteraction swift

7
推荐指数
2
解决办法
2万
查看次数

XCTest.framework/XCTest:运行应用程序时通用包装器中没有匹配的架构

谁能向我解释一下这里发生了什么?我不明白这个错误是什么意思。

XCTest.framework/XCTest:通用包装器中没有匹配的架构

添加此框架并运行我的应用程序时出现错误

敏捷框架

快速框架

图像

图片2

xcode ios swift

5
推荐指数
1
解决办法
831
查看次数

标签 统计

ios ×2

swift ×2

uidocumentinteraction ×1

xcode ×1