0
我試圖加載PDF文件,該文件是在我的Xcode項目我使用這個代碼的Web視圖ViewDidLoad
廣東話載入本地PDF文件到的WebView
var pdfLoc = NSURL(fileURLWithPath:NSBundle.mainBundle().pathForResource("Anteproyecto", ofType:"pdf")!)
var request = NSURLRequest(URL: pdfLoc!)
webView.loadRequest(request)
昨天它的工作,但今天它crsahes並在日誌中顯示此錯誤
DiskImageCache: Could not resolve the absolute path of the old directory.
我在做什麼錯?
我試過了,但仍然出現同樣的崩潰 – Zablah
請嘗試調試一個pdf文件是否存在路徑或不。爲此,從路徑變量中獲取路徑並返回到查找器Go->轉到文件夾。 –