當它到達此塊時,我的應用程序崩潰。Swift錯誤 - 致命錯誤:意外地發現零,同時展開一個可選值
let uploadFile:PFFile = tweet["uploadedPic"] as PFFile
uploadFile.getDataInBackgroundWithBlock {
(uploadData:NSData!, error:NSError!)-> Void in
let uploadImage:UIImage = UIImage(data: uploadData)!
cell.attachedImage.image = uploadImage
}
爲什麼我會收到此錯誤?
fatal error: unexpectedly found nil while unwrapping an Optional value
任何想法?
謝謝!
這個問題,會彈出一個每天至少5倍左右。 – zisoft 2014-11-24 08:31:50
試圖改善您的問題(這是一個***質量低的問題***),但不能,所以我標記爲VLQ。請在發生崩潰之前添加更多詳細信息,例如代碼。 – cybermonkey 2014-11-24 08:32:26
@cybermonkey你是什麼意思?我已經縮小到這塊代碼一切都很好:) – user3679109 2014-11-24 08:33:59