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欢迎伴侣:) –