2017-04-12 92 views

回答

3

創建普通Swift dictionary,設置所需的屬性,然後使用與上述相同的語法調用setValue

例如:

let ref: FIRDatabaseReference = ... 
let post = [ 
    "title": "Incompleteness Theorem", 
    "author": "Kurt Gödel", 
    "date": "1931" 
] 
ref.child("Posts").childByAutoId().setValue(post) 
相關問題