WKWebView 加载本地PDF

    // Do any additional setup after loading the view.
    let web = WKWebView.init(frame: UIScreen.main.bounds)
    
    let str2 = Bundle.main.resourceURL?.appendingPathComponent("3_sim_finalUI.pdf")
    web.loadFileURL(str2!, allowingReadAccessTo: str2!)

你可能感兴趣的:(WKWebView 加载本地PDF)