我收到此错误:"尝试运行此代码块时,键入'Any'没有下标成员":
init(snapshot: FIRDataSnapshot) {
key = snapshot.key
itemRef = snapshot.ref
if let postContent = snapshot.value!["content"] as? String { // error
content = postContent
} else {
content = ""
}
}
Run Code Online (Sandbox Code Playgroud)
我一直在寻找答案,找不到用FireBase解决这个问题的答案.我该如何解决这个错误?