1
這段代碼本可以在幾個月前工作,我在GitHub上檢查了一些其他代碼,並驗證了這段代碼在過去可行,但是我很難找到一個辦法。我已經使用Firebase Migration Support尋找解決方案,但我沒有運氣。先謝謝你!'StorageReference'類型的值沒有成員'data'
func configCell(searchDetail: Search) {
self.searchDetail = searchDetail
nameLbl.text = searchDetail.username
let ref = Storage.storage().reference(forURL: searchDetail.userImg)
//Error Below, highlighting 'ref.data' Error: Value of type 'StorageReference' has no member 'data'.
ref.data(withMaxSize: 1000000, completion: { (data, error) in
if error != nil {
print(" we couldnt upload the img")
} else {
if let imgData = data {
if let img = UIImage(data: imgData) {
self.userImage.image = img
}
}
}
})
}
噢,我的天啊,非常感謝。對不起,沒有捕捉到。 –
@ AladdinAl-Khatib歡迎伴侶:) –